summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2010-10-05 21:34:39 -0300
committerJohan Dahlin <johan@gnome.org>2010-10-05 21:34:39 -0300
commit754e5462f6dfbe3793eb959abf3dbfa7d2fe6435 (patch)
tree21d7277b168b8af92a2cd2d1fcc5d49ab654f3bb
parentd15e386c8e10dd6b645a444e29cc053100089a07 (diff)
downloadgobject-introspection-754e5462f6dfbe3793eb959abf3dbfa7d2fe6435.tar.gz
block can be None, fixup last commit
-rw-r--r--giscanner/maintransformer.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 9053abf4..a55fdf41 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -411,9 +411,10 @@ usage is void (*_gtk_reserved1)(void);"""
"Unknown container %r for element-type annotation" % (node.type, ))
def _apply_annotations_enum(self, node, block):
- enum_type = block.options.get(OPT_TYPE)
- if enum_type and enum_type.one() == 'bitfield':
- node.__class__ = ast.Bitfield
+ if block:
+ enum_type = block.options.get(OPT_TYPE)
+ if enum_type and enum_type.one() == 'bitfield':
+ node.__class__ = ast.Bitfield
self._apply_annotations_annotated(node, block)
def _get_transfer_default_param(self, parent, node):