Merge "python3: use a list of IPDevice objects in tests"

This commit is contained in:
Jenkins 2017-06-15 23:33:14 +00:00 committed by Gerrit Code Review
commit fa5babc9a5
1 changed files with 2 additions and 2 deletions

View File

@ -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))