From 7f38ac2caf38bd1eb0227cda36110c7cd1cb3424 Mon Sep 17 00:00:00 2001 From: David Weinholz Date: Fri, 8 Feb 2019 14:01:02 +0100 Subject: [PATCH] fixed smlal bug --- VirtualMachineService/VirtualMachineHandler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index cbb8f792..570dd224 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -321,7 +321,11 @@ def get_server(self, openstack_id): floating_ip = None fixed_ip = None self.logger.info("Get Server {0}".format(openstack_id)) - server = self.conn.compute.get_server(openstack_id) + try: + server = self.conn.compute.get_server(openstack_id) + except Exception as e: + self.logger.error("No Server found {0} | Error {1}".format(openstack_id,e)) + return VM(status='DELETED') if server is None: self.logger.error("No Server {0}".format(openstack_id)) raise serverNotFoundException(