summaryrefslogtreecommitdiff
path: root/giscanner/girwriter.py
diff options
context:
space:
mode:
authorJohan Dahlin <jdahlin@litl.com>2011-08-13 12:45:12 -0300
committerJohan Dahlin <jdahlin@litl.com>2011-08-13 12:45:12 -0300
commita8b700e2d9c7b63bd351f4194820680f4da3da8a (patch)
tree83279b00537e93569f942f32d673ab2d0d64baf1 /giscanner/girwriter.py
parentd7a2b1dc90bd61bcd0908c3fd8b124bb84ecc862 (diff)
downloadgobject-introspection-a8b700e2d9c7b63bd351f4194820680f4da3da8a.tar.gz
Make sure signal works when there isn't one specified
Diffstat (limited to 'giscanner/girwriter.py')
-rw-r--r--giscanner/girwriter.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/giscanner/girwriter.py b/giscanner/girwriter.py
index 591c7aea..f9937291 100644
--- a/giscanner/girwriter.py
+++ b/giscanner/girwriter.py
@@ -554,8 +554,9 @@ and/or use gtk-doc annotations. ''')
self._write_type(field.type)
def _write_signal(self, signal):
- attrs = [('name', signal.name),
- ('when', signal.when)]
+ attrs = [('name', signal.name)]
+ if signal.when:
+ attrs.append(('when', signal.when))
if signal.no_recurse:
attrs.append(('no-recurse', '1'))
if signal.detailed: