Adding asbtract topology diagram for documentation
[nepi.git] / src / nepi / util / parsers / xml_parser.py
index ca68be1..f6ac957 100644 (file)
@@ -267,12 +267,18 @@ class ECXMLParser(object):
                 os.environ["NEPI_NTHREADS"] = nthreads
 
                 # Deserialize netgraph
+                topology = None
+                topo_type = None
+
                 netgraph = self._netgraph_from_xml(doc, ecnode)
-                topo_type = netgraph.topo_type if netgraph else None
+                
+                if netgraph:
+                    topo_type = netgraph.topo_type
+                    topology = netgraph.topology
 
                 # Instantiate EC
                 ec = ExperimentController(exp_id = exp_id, local_dir = local_dir, 
-                        topology = netgraph.topology, topo_type = topo_type)
+                        topology = topology, topo_type = topo_type)
 
                 connections = set()