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