Fix gen_bridge_files relying on global state

master
LEdoian 3 years ago
parent 4d13f121ff
commit b90663e316

@ -51,7 +51,7 @@ bridges = {}
for i, n in [(x, 'net_'+str(x)) for x in range(1, 8)]:
bridges[i] = Bridge(n, i)
def gen_bridge_files():
def gen_bridge_files(bridges):
files = [
'bridge.conf',
'gen_bridges.sh',
@ -87,7 +87,7 @@ for net, cs in conns.items():
comps[c].add_to_bridge(bridges[net])
os.mkdir('output')
gen_bridge_files()
gen_bridge_files(bridges)
for c in comps.values():
c.gen_files()

Loading…
Cancel
Save