core: fix handling vm.start_time for just shutdown VM
That xenstore entry may be already removed even when libvirt still reports the VM as running. Fix QubesOS/qubes-issues#2127
This commit is contained in:
parent
03210f6cfe
commit
8c7f072461
@ -967,7 +967,7 @@ class QubesVm(object):
|
||||
uuid = self.uuid
|
||||
|
||||
start_time = vmm.xs.read('', "/vm/%s/start_time" % str(uuid))
|
||||
if start_time != '':
|
||||
if start_time:
|
||||
return datetime.datetime.fromtimestamp(float(start_time))
|
||||
else:
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user