changeset 1321:6a014a4ec79e

Fix missed variable name after refactory
author Thinker K.F. Li <thinker@codemud.net>
date Sun, 23 Jan 2011 09:06:05 +0800
parents 6090be010927
children 7f25abbc1b61
files pyink/domview.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pyink/domview.py	Sat Jan 22 23:32:21 2011 +0800
+++ b/pyink/domview.py	Sun Jan 23 09:06:05 2011 +0800
@@ -219,17 +219,21 @@
     # This method is called by domview._init_metadata().
     #
     def _component_manager_init_metadata(self):
-	for n in self._metadata_node.childList():
+        metadata_node = self._metadata_node
+
+        # Make sure ns0:components in metadata
+	for n in metadata_node.childList():
 	    if n.name() == 'ns0:components':
 		self._components_node = n
 		break
 	    pass
 	else:
 	    components_node = self._doc.createElement("ns0:components")
-	    node.appendChild(components_node)
+	    metadata_node.appendChild(components_node)
 	    self._components_node = components_node
 	    pass
         
+        # Make sure the group for containing components.
         for n in self._root.childList():
             if n.name() != 'svg:g':
                 continue