[CLI] Fixed when the output dir for the log doesn't exist
This commit is contained in:
parent
bb592a8ec4
commit
7849fc0bde
|
|
@ -319,6 +319,8 @@ def main():
|
||||||
if args.log:
|
if args.log:
|
||||||
if os.path.isfile(args.log):
|
if os.path.isfile(args.log):
|
||||||
os.remove(args.log)
|
os.remove(args.log)
|
||||||
|
else:
|
||||||
|
os.makedirs(os.path.dirname(os.path.abspath(args.log)), exist_ok=True)
|
||||||
log.set_file_log(args.log)
|
log.set_file_log(args.log)
|
||||||
GS.debug_level = 10
|
GS.debug_level = 10
|
||||||
# The log setup finished, this is our first log message
|
# The log setup finished, this is our first log message
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue