Skip to content

Commit

Permalink
Safely remove passthrough Nodes with no input
Browse files Browse the repository at this point in the history
Fixes a bug which resulted from attempting to remove a passthrough Node
with no incoming connections.
  • Loading branch information
mundya committed Apr 14, 2016
1 parent b9b4fa7 commit cc2feb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nengo_spinnaker/utils/model.py
Expand Up @@ -168,7 +168,7 @@ def remove_operator_from_connection_map(conn_map, target, force=True):
conn_map.add_connection(**kwargs)

# Determine whether the changes made should be discarded.
new_max_packets = max(itervalues(new_rx))
new_max_packets = 0 if not new_rx else max(itervalues(new_rx))
discard_changes = new_max_packets > old_max_packets

# If not forced and we caused a worsening in network usage then copy the
Expand Down

0 comments on commit cc2feb7

Please sign in to comment.