mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-25 16:28:11 +00:00
Catch GeneratorExit exception. Fixes #231.
This commit is contained in:
parent
64bf935222
commit
382747a2f2
@ -115,7 +115,7 @@ class BaseManager:
|
|||||||
for future in done:
|
for future in done:
|
||||||
try:
|
try:
|
||||||
future.result()
|
future.result()
|
||||||
except Exception as e:
|
except (Exception, GeneratorExit) as e:
|
||||||
log.error("Could not close VM {}".format(e), exc_info=1)
|
log.error("Could not close VM {}".format(e), exc_info=1)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ class Dynamips(BaseManager):
|
|||||||
for future in done:
|
for future in done:
|
||||||
try:
|
try:
|
||||||
future.result()
|
future.result()
|
||||||
except Exception as e:
|
except (Exception, GeneratorExit) as e:
|
||||||
log.error("Could not stop device hypervisor {}".format(e), exc_info=1)
|
log.error("Could not stop device hypervisor {}".format(e), exc_info=1)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ class Dynamips(BaseManager):
|
|||||||
for future in done:
|
for future in done:
|
||||||
try:
|
try:
|
||||||
future.result()
|
future.result()
|
||||||
except Exception as e:
|
except (Exception, GeneratorExit) as e:
|
||||||
log.error("Could not delete device {}".format(e), exc_info=1)
|
log.error("Could not delete device {}".format(e), exc_info=1)
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
|
@ -367,7 +367,7 @@ class Project:
|
|||||||
for future in done:
|
for future in done:
|
||||||
try:
|
try:
|
||||||
future.result()
|
future.result()
|
||||||
except Exception as e:
|
except (Exception, GeneratorExit) as e:
|
||||||
log.error("Could not close VM or device {}".format(e), exc_info=1)
|
log.error("Could not close VM or device {}".format(e), exc_info=1)
|
||||||
|
|
||||||
if cleanup and os.path.exists(self.path):
|
if cleanup and os.path.exists(self.path):
|
||||||
|
Loading…
Reference in New Issue
Block a user