Fix bug where dom was Nonetype
This commit is contained in:
parent
e48409b96a
commit
e1d550b437
|
@ -250,7 +250,12 @@ class VMInstance:
|
|||
except:
|
||||
continue
|
||||
|
||||
if self.dom.state()[0] == libvirt.VIR_DOMAIN_RUNNING:
|
||||
try:
|
||||
dom_state = self.dom.state()[0]
|
||||
except AttributeError:
|
||||
dom_state = None
|
||||
|
||||
if dom_state == libvirt.VIR_DOMAIN_RUNNING:
|
||||
if not self.domuuid in self.thishypervisor.domain_list:
|
||||
self.thishypervisor.domain_list.append(self.domuuid)
|
||||
ansiiprint.echo('Successfully received migrated VM', '{}:'.format(self.domuuid), 'o')
|
||||
|
|
Loading…
Reference in New Issue