From 8b9cdf4924ef58e3da7f49d99e74262d95379c09 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Mon, 11 Jun 2018 02:58:37 -0400 Subject: [PATCH] Some bugfixes here --- VMInstance.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VMInstance.py b/VMInstance.py index 2a81d937..dcf70a35 100644 --- a/VMInstance.py +++ b/VMInstance.py @@ -204,13 +204,13 @@ class VMInstance: def receive_migrate(self): ansiiprint.echo('Receiving migration', '{}:'.format(self.domuuid), 'i') self.inreceive = True - while True: + while self.state == 'migrate': self.dom = self.lookupByUUID(self.domuuid) if self.dom == None: time.sleep(0.2) continue - if self.dom.state()[0] == libvirt.VIR_DOMAIN_RUNNING or self.state != 'migrate': + if self.dom.state()[0] == libvirt.VIR_DOMAIN_RUNNING: break if self.dom.state()[0] == libvirt.VIR_DOMAIN_RUNNING: