Commit c2767759 authored by Manuel Christlieb's avatar Manuel Christlieb

fix: [no-member] Instance of 'OSError' has no 'message' member

parent fb74e362
......@@ -94,9 +94,9 @@ class TemplateModule(BaseModule):
try:
with open(output_file, 'w') as fh:
fh.write(rendered)
except IOError as e:
except IOError as error:
termcolor.cprint('Template output could not be saved (%s)' % args.output_file, color='red')
termcolor.cprint(e.message, color='yellow')
termcolor.cprint(str(error), color='yellow')
sys.exit(1)
else:
print(rendered)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment