better error message

This commit is contained in:
Yuxin Wu
2020-06-30 23:31:56 -07:00
parent 7eb7c60a81
commit f2ba97117c
2 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ if __name__ == '__main__':
render = HTMLRender(parser, res)
htmls = render.render_msgs(msgs)
os.makedirs(os.path.dirname(output_file), exist_ok=True)
os.makedirs(os.path.dirname(os.path.abspath(output_file)), exist_ok=True)
if len(htmls) == 1:
with open(output_file, 'w') as f:
f.write(htmls[0])