[CLI] Fixed when the output dir for the log doesn't exist

This commit is contained in:
Salvador E. Tropea 2023-04-01 14:46:35 -03:00
parent bb592a8ec4
commit 7849fc0bde
1 changed files with 2 additions and 0 deletions

View File

@ -319,6 +319,8 @@ def main():
if args.log:
if os.path.isfile(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)
GS.debug_level = 10
# The log setup finished, this is our first log message