mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 11:18:11 +00:00
Explicit utf-8 decoding.
This commit is contained in:
parent
6edf1e3649
commit
271cb527d4
@ -284,7 +284,7 @@ class DynamipsHypervisor:
|
|||||||
if not line:
|
if not line:
|
||||||
raise DynamipsError("No data returned from {host}:{port}, Dynamips process running: {run}"
|
raise DynamipsError("No data returned from {host}:{port}, Dynamips process running: {run}"
|
||||||
.format(host=self._host, port=self._port, run=self.is_running()))
|
.format(host=self._host, port=self._port, run=self.is_running()))
|
||||||
buf += line.decode()
|
buf += line.decode("utf-8")
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
raise DynamipsError("Lost communication with {host}:{port} :{error}, Dynamips process running: {run}"
|
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()))
|
.format(host=self._host, port=self._port, error=e, run=self.is_running()))
|
||||||
|
@ -644,7 +644,7 @@ class QemuVM(BaseVM):
|
|||||||
break
|
break
|
||||||
for expect in expected:
|
for expect in expected:
|
||||||
if expect in line:
|
if expect in line:
|
||||||
result = line.decode().strip()
|
result = line.decode("utf-8").strip()
|
||||||
break
|
break
|
||||||
except EOFError as e:
|
except EOFError as e:
|
||||||
log.warn("Could not read from QEMU monitor: {}".format(e))
|
log.warn("Could not read from QEMU monitor: {}".format(e))
|
||||||
|
Loading…
Reference in New Issue
Block a user