From d9e17d295f23b7cef68f94dc1f37101cbe4a1674 Mon Sep 17 00:00:00 2001 From: Alina Quereilhac Date: Thu, 17 Feb 2011 17:14:47 +0100 Subject: [PATCH] bugfixes --- src/nepi/core/description.py | 10 ++++++---- src/nepi/util/parser/_xml.py | 8 ++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/nepi/core/description.py b/src/nepi/core/description.py index baae03f7..e0e51107 100644 --- a/src/nepi/core/description.py +++ b/src/nepi/core/description.py @@ -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() diff --git a/src/nepi/util/parser/_xml.py b/src/nepi/util/parser/_xml.py index 5f2e3d6e..000260b5 100644 --- a/src/nepi/util/parser/_xml.py +++ b/src/nepi/util/parser/_xml.py @@ -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) -- 2.47.0