Skip to content

Commit 2850e66

Browse files
committed
Fix networkx compatibility warning (Python 3.9 fix)
1 parent 85a761a commit 2850e66

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

thug/Logging/modules/ExploitGraph.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ def add_connection(self, source, destination, method):
3636

3737
def draw(self):
3838
G = networkx.convert_node_labels_to_integers(self.G, label_attribute="url")
39-
d = json_graph.node_link_data(G, edges="links")
39+
40+
try: # pragma: no cover
41+
d = json_graph.node_link_data(G, edges="links")
42+
except TypeError:
43+
d = json_graph.node_link_data(G)
4044

4145
return json.dumps(d)

0 commit comments

Comments
 (0)