[gobject-introspection] mallardwriter: Fix format_page_name for Namespace



commit 9a029d510eac79c2e651ea8bffeea1b8a09d3d57
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Jan 31 11:32:16 2013 -0500

    mallardwriter: Fix format_page_name for Namespace
    
    Namespace doesn't have a namespace member.

 giscanner/mallardwriter.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/giscanner/mallardwriter.py b/giscanner/mallardwriter.py
index 5868922..ccd65f0 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)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]