diff --git a/neutron/tests/common/exclusive_resources/resource_allocator.py b/neutron/tests/common/exclusive_resources/resource_allocator.py index cbc04f45e61..2bd046e0733 100644 --- a/neutron/tests/common/exclusive_resources/resource_allocator.py +++ b/neutron/tests/common/exclusive_resources/resource_allocator.py @@ -89,7 +89,7 @@ class ResourceAllocator(object): @utils.synchronized('resource_allocator', external=True, lock_path='/tmp') def release(self, resource): allocations = self._get_allocations() - allocations.discard(resource) + allocations.remove(resource) if allocations: self._write_allocations(allocations) else: # Clean up the file if we're releasing the last allocation