Skip to content

Commit

Permalink
Make sure graph is not generated by AttackGraph.__init__ when deepcop…
Browse files Browse the repository at this point in the history
…ying
  • Loading branch information
mrkickling committed Sep 17, 2024
1 parent 5bdf57e commit 05cd8c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion maltoolbox/attackgraph/attackgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ def _to_dict(self) -> dict:
}

def __deepcopy__(self, memo):
copied_attackgraph = AttackGraph(self.lang_graph, self.model)
copied_attackgraph = AttackGraph(self.lang_graph)
copied_attackgraph.model = self.model

# Deep copy nodes and add references to them
copied_attackgraph.nodes = copy.deepcopy(self.nodes, memo)
Expand Down

0 comments on commit 05cd8c8

Please sign in to comment.