fixed bug where log would fail to generate if output folder did not exist

This commit is contained in:
Jesse Cirimelli-Low 2019-04-17 15:02:10 -07:00
parent c1411f4227
commit 49e5f97eb4
1 changed files with 2 additions and 0 deletions

View File

@ -58,6 +58,8 @@ def log(str):
# in another log file if the path or name changes.
if not globals.OPTS.output_path.endswith('/'):
globals.OPTS.output_path += "/"
if not os.path.isdir(globals.OPTS.output_path):
os.mkdir(globals.OPTS.output_path)
compile_log = open(globals.OPTS.output_path +
globals.OPTS.output_name + '.log', "w+")
log.create_file = 0