Fix #328, enabling switch port numbers in topology.json to have more than 1 digit (#329)

This commit is contained in:
Andy Fingerhut 2020-01-26 20:17:18 -08:00 committed by Nate Foster
parent 2df5f43b3a
commit d9fdc0f446

View File

@ -113,7 +113,7 @@ class ExerciseTopo(Topo):
assert(len(node.split('-')) == 2)
sw_name, sw_port = node.split('-')
try:
sw_port = int(sw_port[1])
sw_port = int(sw_port[1:])
except:
raise Exception('Invalid switch node in topology file: {}'.format(node))
return sw_name, sw_port