From 1b22c622e1334d2acd5cc75eaf197ccc172a2e77 Mon Sep 17 00:00:00 2001 From: micafer Date: Fri, 27 Nov 2015 09:23:52 +0100 Subject: [PATCH] Minor bugfix when a error apears updating a VM info --- IM/VirtualMachine.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/IM/VirtualMachine.py b/IM/VirtualMachine.py index 4698b4e00..8dba1ba9b 100644 --- a/IM/VirtualMachine.py +++ b/IM/VirtualMachine.py @@ -400,8 +400,10 @@ def update_status(self, auth): state = new_vm.state updated = True - with self._lock: - self.last_update = now + with self._lock: + self.last_update = now + else: + VirtualMachine.logger.error("Error updating VM status: %s" % new_vm) except: VirtualMachine.logger.exception("Error updating VM status.") updated = False