Sleep while waiting

This commit is contained in:
Joshua Boniface 2018-06-02 16:55:48 -04:00
parent 6aca8f9fee
commit 3e24eab61e
1 changed files with 2 additions and 0 deletions

View File

@ -135,6 +135,8 @@ class VMInstance:
while True: while True:
if self.dom == None or self.dom.state() != libvirt.VIR_DOMAIN_RUNNING: if self.dom == None or self.dom.state() != libvirt.VIR_DOMAIN_RUNNING:
try: try:
time.sleep(0.2)
print("derp")
self.dom = conn.lookupByUUID(uuid.UUID(self.domuuid).bytes) self.dom = conn.lookupByUUID(uuid.UUID(self.domuuid).bytes)
except: except:
pass pass