1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-05 07:38:56 +00:00

Rename vms_lock to vm_locks.

This commit is contained in:
grossmj 2015-02-24 21:02:37 -07:00
parent 6bb7ab20b3
commit 550cc7f508

View File

@ -63,7 +63,7 @@ class Route(object):
_routes = [] _routes = []
_documentation = {} _documentation = {}
_vms_lock = {} _vm_locks = {}
@classmethod @classmethod
def get(cls, path, *args, **kw): def get(cls, path, *args, **kw):
@ -163,8 +163,8 @@ class Route(object):
vm_id = request.match_info.get("vm_id") vm_id = request.match_info.get("vm_id")
if vm_id is None: if vm_id is None:
vm_id = request.match_info["device_id"] vm_id = request.match_info["device_id"]
cls._vms_lock.setdefault(vm_id, asyncio.Lock()) cls._vm_locks.setdefault(vm_id, asyncio.Lock())
with (yield from cls._vms_lock[vm_id]): with (yield from cls._vm_locks[vm_id]):
response = yield from control_schema(request) response = yield from control_schema(request)
else: else:
response = yield from control_schema(request) response = yield from control_schema(request)