summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner')
-rw-r--r--giscanner/ast.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/giscanner/ast.py b/giscanner/ast.py
index 99bbd3e1..7a2b5b15 100644
--- a/giscanner/ast.py
+++ b/giscanner/ast.py
@@ -569,7 +569,8 @@ class Node(Annotated):
(namespace, name) pair. When combined with a ., this is called a
GIName. It's possible for nodes to contain or point to other nodes."""
- c_name = property(lambda self: self.namespace.name + self.name)
+ c_name = property(lambda self: self.namespace.name + self.name if self.namespace else
+ self.name)
gi_name = property(lambda self: '%s.%s' % (self.namespace.name, self.name))
def __init__(self, name=None):