Skip to content

Commit

Permalink
fix name collision in SbNetwork.connect
Browse files Browse the repository at this point in the history
  • Loading branch information
sgherbst committed May 11, 2024
1 parent b0a8be8 commit 5fbf50e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion switchboard/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,10 @@ def external(self, intf, name=None, txrx=None, uri=None):
# save interface

if name is None:
name = intf.name
name = f'{intf.inst.name}_{intf.name}'

assert name not in self.intf_defs, \
f'Network already contains an external interface called "{name}".'

self.intf_defs[name] = intf_def

Expand Down

0 comments on commit 5fbf50e

Please # to comment.