Merge "python3: use a list of IPDevice objects in tests"
This commit is contained in:
commit
fa5babc9a5
|
@ -923,12 +923,12 @@ class VethBridge(object):
|
|||
|
||||
def __init__(self, ports):
|
||||
self.ports = ports
|
||||
self.unallocated_ports = set(self.ports)
|
||||
self.unallocated_ports = list(self.ports)
|
||||
|
||||
def allocate_port(self):
|
||||
try:
|
||||
return self.unallocated_ports.pop()
|
||||
except KeyError:
|
||||
except IndexError:
|
||||
tools.fail('All FakeBridge ports (%s) are already allocated.' %
|
||||
len(self.ports))
|
||||
|
||||
|
|
Loading…
Reference in New Issue