bugfixes
authorAlina Quereilhac <alina.quereilhac@inria.fr>
Thu, 17 Feb 2011 16:14:47 +0000 (17:14 +0100)
committerAlina Quereilhac <alina.quereilhac@inria.fr>
Thu, 17 Feb 2011 16:14:47 +0000 (17:14 +0100)
src/nepi/core/description.py
src/nepi/util/parser/_xml.py

index baae03f..e0e5110 100644 (file)
@@ -119,7 +119,7 @@ class Connector(object):
         return self.connector_type.can_connect(connector_type_id) 
 
     def destroy(self):
-        for connector in self._connections:
+        for connector in self.connections:
             self.disconnect(connector)
         self._box = self._connectors = None
 
@@ -332,7 +332,7 @@ class RoutingTableBox(Box):
         del route
 
     def destroy(self):
-        super(RoutingCapableBox, self).destroy()
+        super(RoutingTableBox, self).destroy()
         for route in self.routes:
             self.delete_route(route)
         self._route = None
@@ -481,8 +481,7 @@ class TestbedDescription(AttributesMap):
         box.destroy()
 
     def destroy(self):
-        for guid, box in self._boxes.iteitems():
-            del self._boxes[guid]
+        for guid, box in self._boxes.iteritems():
             box.destroy()
         self._boxes = None
 
@@ -524,3 +523,6 @@ class ExperimentDescription(object):
         guid = testbed_description.guid
         del self._testbed_descriptions[guid]
 
+    def destroy(self):
+        for testbed_description in self.testbed_descriptions:
+            testbed_description.destroy()
index 5f2e3d6..000260b 100644 (file)
@@ -177,10 +177,10 @@ class XmlExperimentParser(ExperimentParser):
 
         graphical_info_tag = graphical_info_tag_list[0]
         if graphical_info_tag.nodeType == tag.ELEMENT_NODE:
-            x = int(graphical_info_tag.getAttribute("x"))
-            y = int(graphical_info_tag.getAttribute("y"))
-            width = int(graphical_info_tag.getAttribute("width"))
-            height = int(graphical_info_tag.getAttribute("height"))
+            x = float(graphical_info_tag.getAttribute("x"))
+            y = float(graphical_info_tag.getAttribute("y"))
+            width = float(graphical_info_tag.getAttribute("width"))
+            height = float(graphical_info_tag.getAttribute("height"))
             label = str(graphical_info_tag.getAttribute("label"))
             data.add_graphical_info_data(guid, x, y, width, height, label)