Commit ded03013 authored by Bryton Lacquement's avatar Bryton Lacquement 🚪

fixup! Add support for Python 3

This is another fixup for commit

This is not covered by tests since they use a fake_send method.
parent c90ab036
......@@ -36,6 +36,7 @@ import time
import errno
import psutil
from operator import itemgetter
from slapos.util import str2bytes
def parseArgument():
......@@ -168,15 +169,14 @@ class QemuQMPWrapper(object):
return response
def _send(self, message, retry=0, sleep=0.5):
for i in range(retry + 1):
response = self._readResponse()
for i in range(0, retry):
if response is not None:
if i < retry:
print("Retrying send command after %s second(s)..." % sleep)
response = self._readResponse()
return response
def _getVMStatus(self):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment