Skip to content

Commit

Permalink
Don't make a nested dict when (re)adding edges in undo function.
Browse files Browse the repository at this point in the history
Fixes crash when undoing simulated router failures.
  • Loading branch information
knumor committed Apr 28, 2016
1 parent 59fe153 commit 8a4c06c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ def undo(self, change_no):

self.graph.add_node(router)
for (u, v, w) in edges:
self.graph.add_edge(u, v, weight=w)
self.graph.add_edge(u, v, w)

del self.changes[idx]

Expand Down

0 comments on commit 8a4c06c

Please sign in to comment.