1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-26 00:38:10 +00:00

Merge remote-tracking branch 'origin/asyncio' into asyncio

This commit is contained in:
Jeremy 2015-02-18 18:40:16 -07:00
commit 4a3e6632c1
3 changed files with 5 additions and 5 deletions

View File

@ -435,7 +435,7 @@ class Dynamips(BaseManager):
except DynamipsError as e: except DynamipsError as e:
log.warn("Could not create ghost instance: {}".format(e)) log.warn("Could not create ghost instance: {}".format(e))
if vm.ghost_file != ghost_file and os.path.isfile(ghost_file): if vm.ghost_file != ghost_file and os.path.isfile(ghost_file_path):
# set the ghost file to the router # set the ghost file to the router
yield from vm.set_ghost_status(2) yield from vm.set_ghost_status(2)
yield from vm.set_ghost_file(ghost_file) yield from vm.set_ghost_file(ghost_file)

View File

@ -1495,10 +1495,10 @@ class Router(BaseVM):
try: try:
reply = yield from self._hypervisor.send("vm extract_config {}".format(self._name)) reply = yield from self._hypervisor.send("vm extract_config {}".format(self._name))
reply = reply[0].rsplit(' ', 2)[-2:] except DynamipsError:
except IOError:
#for some reason Dynamips gets frozen when it does not find the magic number in the NVRAM file. #for some reason Dynamips gets frozen when it does not find the magic number in the NVRAM file.
return None, None return None, None
reply = reply[0].rsplit(' ', 2)[-2:]
startup_config = reply[0][1:-1] # get statup-config and remove single quotes startup_config = reply[0][1:-1] # get statup-config and remove single quotes
private_config = reply[1][1:-1] # get private-config and remove single quotes private_config = reply[1][1:-1] # get private-config and remove single quotes
return startup_config, private_config return startup_config, private_config

View File

@ -115,8 +115,8 @@ class Route(object):
except VMError as e: except VMError as e:
log.error("VM error detected: {type}".format(type=type(e)), exc_info=1) log.error("VM error detected: {type}".format(type=type(e)), exc_info=1)
response = Response(route=route) response = Response(route=route)
response.set_status(500) response.set_status(409)
response.json({"message": str(e), "status": 500}) response.json({"message": str(e), "status": 409})
except Exception as e: except Exception as e:
log.error("Uncaught exception detected: {type}".format(type=type(e)), exc_info=1) log.error("Uncaught exception detected: {type}".format(type=type(e)), exc_info=1)
response = Response(route=route) response = Response(route=route)