From 666064f1ae5e644ee1fd90357aa45c104a7eab87 Mon Sep 17 00:00:00 2001 From: grossmj Date: Fri, 27 Feb 2015 22:01:37 -0700 Subject: [PATCH] Revert commit: Remove lock for Ghost IOS (problem on Windows). --- gns3server/modules/dynamips/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gns3server/modules/dynamips/__init__.py b/gns3server/modules/dynamips/__init__.py index 05023a96..23af464b 100644 --- a/gns3server/modules/dynamips/__init__.py +++ b/gns3server/modules/dynamips/__init__.py @@ -105,6 +105,7 @@ class Dynamips(BaseManager): _VM_CLASS = DynamipsVM _DEVICE_CLASS = DynamipsDevice + _ghost_ios_lock = asyncio.Lock() def __init__(self): @@ -347,7 +348,8 @@ class Dynamips(BaseManager): ghost_ios_support = self.config.get_section_config("Dynamips").getboolean("ghost_ios_support", True) if ghost_ios_support: - yield from self._set_ghost_ios(vm) + with (yield from Dynamips._ghost_ios_lock): + yield from self._set_ghost_ios(vm) @asyncio.coroutine def create_nio(self, node, nio_settings):