[gobject-introspection] docwriter: Fix Exception message attribute
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] docwriter: Fix Exception message attribute
- Date: Mon, 8 Apr 2019 05:48:04 +0000 (UTC)
commit 551a3f77816b89b540cdca6836c2822ac4740adb
Author: Philip Chimento <philip chimento gmail com>
Date: Sat Apr 6 14:17:12 2019 -0700
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.
giscanner/docwriter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/giscanner/docwriter.py b/giscanner/docwriter.py
index aa8b993c..786da80d 100644
--- a/giscanner/docwriter.py
+++ b/giscanner/docwriter.py
@@ -1209,7 +1209,7 @@ class DevDocsFormatterGjs(DocFormatterGjs):
try:
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', node.parent.name,
file=sys.stderr)
return node.parent.name + '_invalid_node'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]