From 83a7e253895a0186974f023bb6308f287b913f04 Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 13 Aug 2015 20:15:50 -0600 Subject: [PATCH] Fixes Unicode error. Fixes #290. --- gns3server/modules/dynamips/dynamips_hypervisor.py | 2 +- gns3server/modules/dynamips/nodes/router.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gns3server/modules/dynamips/dynamips_hypervisor.py b/gns3server/modules/dynamips/dynamips_hypervisor.py index f4ef1de9..6943c862 100644 --- a/gns3server/modules/dynamips/dynamips_hypervisor.py +++ b/gns3server/modules/dynamips/dynamips_hypervisor.py @@ -285,7 +285,7 @@ class DynamipsHypervisor: if not chunk: raise DynamipsError("No data returned from {host}:{port}, Dynamips process running: {run}" .format(host=self._host, port=self._port, run=self.is_running())) - buf += chunk.decode("utf-8") + buf += chunk.decode("utf-8", errors="ignore") 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())) diff --git a/gns3server/modules/dynamips/nodes/router.py b/gns3server/modules/dynamips/nodes/router.py index 07bdba6e..5d8331e3 100644 --- a/gns3server/modules/dynamips/nodes/router.py +++ b/gns3server/modules/dynamips/nodes/router.py @@ -353,6 +353,7 @@ class Router(BaseVM): files += glob.glob(os.path.join(project_dir, "{}_i{}_slot[0-1]".format(self.platform, self.dynamips_id))) files += glob.glob(os.path.join(project_dir, "{}_i{}_nvram".format(self.platform, self.dynamips_id))) files += glob.glob(os.path.join(project_dir, "{}_i{}_flash[0-1]".format(self.platform, self.dynamips_id))) + files += glob.glob(os.path.join(project_dir, "{}_i{}_rom".format(self.platform, self.dynamips_id))) for file in files: try: log.debug("Deleting file {}".format(file))