summaryrefslogtreecommitdiff
path: root/giscanner/mallardwriter.py
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2013-01-31 11:32:16 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2013-02-01 19:47:41 -0500
commit9a029d510eac79c2e651ea8bffeea1b8a09d3d57 (patch)
treebecfd0840467e66474c0575bdbb2764627950b29 /giscanner/mallardwriter.py
parenteed71caaf397b596a0e98c7eaf13525d74fe06da (diff)
downloadgobject-introspection-9a029d510eac79c2e651ea8bffeea1b8a09d3d57.tar.gz
mallardwriter: Fix format_page_name for Namespace
Namespace doesn't have a namespace member.
Diffstat (limited to 'giscanner/mallardwriter.py')
-rw-r--r--giscanner/mallardwriter.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/giscanner/mallardwriter.py b/giscanner/mallardwriter.py
index 58689227..ccd65f0d 100644
--- a/giscanner/mallardwriter.py
+++ b/giscanner/mallardwriter.py
@@ -301,10 +301,12 @@ class MallardFormatter(object):
raise NotImplementedError
def format_page_name(self, node):
- namespace = node.namespace
if isinstance(node, ast.Namespace):
return 'Index'
- elif isinstance(node, ast.Function):
+
+ namespace = node.namespace
+
+ if isinstance(node, ast.Function):
return self.format_function_name(node)
elif isinstance(node, ast.Property) and node.parent is not None:
return '%s.%s:%s' % (namespace.name, node.parent.name, node.name)