Merge "exclusive_resources: use set remove instead of discard"
This commit is contained in:
commit
87cb9d8552
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user