Merge "Fix a typo in method name"
This commit is contained in:
commit
8b5207ede3
@ -1129,7 +1129,7 @@ class Resource(object):
|
|||||||
replaced by more recent resource, then delete this and update
|
replaced by more recent resource, then delete this and update
|
||||||
the replacement resource's needed_by and replaces fields.
|
the replacement resource's needed_by and replaces fields.
|
||||||
'''
|
'''
|
||||||
self._aquire(engine_id)
|
self._acquire(engine_id)
|
||||||
try:
|
try:
|
||||||
self.needed_by = list(set(v for v in input_data.values()
|
self.needed_by = list(set(v for v in input_data.values()
|
||||||
if v is not None))
|
if v is not None))
|
||||||
@ -1289,7 +1289,7 @@ class Resource(object):
|
|||||||
|
|
||||||
@contextlib.contextmanager
|
@contextlib.contextmanager
|
||||||
def lock(self, engine_id):
|
def lock(self, engine_id):
|
||||||
self._aquire(engine_id)
|
self._acquire(engine_id)
|
||||||
try:
|
try:
|
||||||
yield
|
yield
|
||||||
except: # noqa
|
except: # noqa
|
||||||
@ -1298,7 +1298,7 @@ class Resource(object):
|
|||||||
else:
|
else:
|
||||||
self._release(engine_id)
|
self._release(engine_id)
|
||||||
|
|
||||||
def _aquire(self, engine_id):
|
def _acquire(self, engine_id):
|
||||||
updated_ok = False
|
updated_ok = False
|
||||||
try:
|
try:
|
||||||
rs = resource_objects.Resource.get_obj(self.context, self.id)
|
rs = resource_objects.Resource.get_obj(self.context, self.id)
|
||||||
|
Loading…
Reference in New Issue
Block a user