Commit 551a3f77 authored by Philip Chimento's avatar Philip Chimento 🚮

docwriter: Fix Exception message attribute

This may have been a leftover from Python 2. Exception('message') does
not automatically set a message attribute on the exception object.
parent c074fe86
......@@ -1209,7 +1209,7 @@ class DevDocsFormatterGjs(DocFormatterGjs):
return super(DevDocsFormatterGjs, self).to_underscores(node)
except Exception as e:
if e.message == 'invalid node':
if e.args[0] == 'invalid node':
print('warning: invalid node in',,
return + '_invalid_node'
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