From 1cbed45f16f6408c12c328d6cf5cde8df952badb Mon Sep 17 00:00:00 2001 From: grossmj Date: Wed, 8 Jul 2020 20:32:58 +0930 Subject: [PATCH] Fix Dynamips ghost image support when project contains a space. Fixes #3015 --- gns3server/compute/dynamips/nodes/router.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gns3server/compute/dynamips/nodes/router.py b/gns3server/compute/dynamips/nodes/router.py index e66e0339..182c9e37 100644 --- a/gns3server/compute/dynamips/nodes/router.py +++ b/gns3server/compute/dynamips/nodes/router.py @@ -26,7 +26,6 @@ import sys import os import re import glob -import shlex import base64 import shutil import binascii @@ -805,12 +804,12 @@ class Router(BaseNode): :ghost_file: path to ghost file """ - await self._hypervisor.send('vm set_ghost_file "{name}" {ghost_file}'.format(name=self._name, - ghost_file=shlex.quote(ghost_file))) + await self._hypervisor.send('vm set_ghost_file "{name}" "{ghost_file}"'.format(name=self._name, + ghost_file=ghost_file)) - log.info('Router "{name}" [{id}]: ghost file set to {ghost_file}'.format(name=self._name, - id=self._id, - ghost_file=ghost_file)) + log.info('Router "{name}" [{id}]: ghost file set to "{ghost_file}"'.format(name=self._name, + id=self._id, + ghost_file=ghost_file)) self._ghost_file = ghost_file