From 90d55fcb8a7af14e226909a5fc4d18af2361073c Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Wed, 1 Apr 2015 17:39:37 +0200 Subject: [PATCH] Raise a DynamipsError if we can't access to VM status Fix #129 --- gns3server/modules/dynamips/nodes/router.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gns3server/modules/dynamips/nodes/router.py b/gns3server/modules/dynamips/nodes/router.py index 65082d51..a6a54312 100644 --- a/gns3server/modules/dynamips/nodes/router.py +++ b/gns3server/modules/dynamips/nodes/router.py @@ -228,6 +228,8 @@ class Router(BaseVM): """ status = yield from self._hypervisor.send('vm get_status "{name}"'.format(name=self._name)) + if len(status) == 0: + raise DynamipsError("Can't get vm {name} status".format(name=self._name)) return self._status[int(status[0])] @asyncio.coroutine