Commit 447887d2 authored by Håvard Eidnes's avatar Håvard Eidnes
Browse files

Work also with newer networkx (tested with 2.1).

Reportedly still works with old version.
parent a2cf8a09
......@@ -85,9 +85,9 @@ def parse_pajek(lines):
edge_data.update(extra_attr)
if G.has_edge(u,v):
if G[u][v]['value'] > float(w):
G.add_edge(u,v,edge_data)
G.add_edge(u,v,**edge_data)
else:
G.add_edge(u,v,edge_data)
G.add_edge(u,v,**edge_data)
if not G.name:
raise Exception("No graph definition found")
if len(G.nodes()) == 0:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment