Explicit utf-8 decoding.

pull/158/head
grossmj 9 years ago
parent 6edf1e3649
commit 271cb527d4

@ -284,7 +284,7 @@ class DynamipsHypervisor:
if not line:
raise DynamipsError("No data returned from {host}:{port}, Dynamips process running: {run}"
.format(host=self._host, port=self._port, run=self.is_running()))
buf += line.decode()
buf += line.decode("utf-8")
except OSError as e:
raise DynamipsError("Lost communication with {host}:{port} :{error}, Dynamips process running: {run}"
.format(host=self._host, port=self._port, error=e, run=self.is_running()))

@ -644,7 +644,7 @@ class QemuVM(BaseVM):
break
for expect in expected:
if expect in line:
result = line.decode().strip()
result = line.decode("utf-8").strip()
break
except EOFError as e:
log.warn("Could not read from QEMU monitor: {}".format(e))

Loading…
Cancel
Save