X-Git-Url: http://git.onelab.eu/?p=nepi.git;a=blobdiff_plain;f=src%2Fnepi%2Futil%2Fnetgraph.py;h=49a194bd85b603aa7725a978a83d04aaa2b91174;hp=8a36d15f85860425c0ffff2737398cb621c014a1;hb=6285ca51026efb69642eea9dfc7c480e722d84a9;hpb=cb5d027b813a27d7de263653e1a8e0cef5490f0a diff --git a/src/nepi/util/netgraph.py b/src/nepi/util/netgraph.py index 8a36d15f..49a194bd 100644 --- a/src/nepi/util/netgraph.py +++ b/src/nepi/util/netgraph.py @@ -188,7 +188,7 @@ class NetGraph(object): def annotate_node(self, nid, name, value): if not isinstance(value, str) and not isinstance(value, int) and \ not isinstance(value, float) and not isinstance(value, bool): - raise RuntimeError, "Non-serializable annotation" + raise RuntimeError("Non-serializable annotation") self.topology.node[nid][name] = value @@ -204,7 +204,7 @@ class NetGraph(object): def annotate_edge(self, nid1, nid2, name, value): if not isinstance(value, str) and not isinstance(value, int) and \ not isinstance(value, float) and not isinstance(value, bool): - raise RuntimeError, "Non-serializable annotation" + raise RuntimeError("Non-serializable annotation") self.topology.edge[nid1][nid2][name] = value @@ -256,7 +256,7 @@ class NetGraph(object): net = ipaddr.IPv6Network(netblock) new_prefix = 30 else: - raise RuntimeError, "Invalid IP version %d" % version + raise RuntimeError("Invalid IP version %d" % version) ## Clear all previusly assigned IPs for nid in self.topology.nodes():