1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-25 16:28:11 +00:00

Explicit utf-8 decoding.

This commit is contained in:
grossmj 2015-04-26 21:19:39 -06:00
parent 6edf1e3649
commit 271cb527d4
2 changed files with 2 additions and 2 deletions

View File

@ -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()))

View File

@ -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))