mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Cleanup unbreakable space
This commit is contained in:
22 files changed
+56
-56
No files matched your search
@@ -423,7 +423,7 @@ class BaseManager:
|
||||
|
||||
return force_unix_path(path)
|
||||
else:
|
||||
# For non local server we disallow using absolute path outside image directory
|
||||
# For non local server we disallow using absolute path outside image directory
|
||||
if Config.instance().get_section_config("Server").get("local", False) is False:
|
||||
img_directory = self.config.get_section_config("Server").get("images_path", os.path.expanduser("~/GNS3/images"))
|
||||
img_directory = force_unix_path(img_directory)
|
||||
|
||||
@@ -71,7 +71,7 @@ class BaseVM:
|
||||
else:
|
||||
self._console = self._manager.port_manager.reserve_tcp_port(self._console, self._project)
|
||||
|
||||
# We need to allocate aux before giving a random console port
|
||||
# We need to allocate aux before giving a random console port
|
||||
if self._aux is not None:
|
||||
self._aux = self._manager.port_manager.reserve_tcp_port(self._aux, self._project)
|
||||
|
||||
|
||||
@@ -117,11 +117,11 @@ class Docker(BaseManager):
|
||||
pass
|
||||
log.debug("Query Docker %s %s params=%s data=%s Response: %s", method, path, params, data, body)
|
||||
if response.status == 304:
|
||||
raise DockerHttp304Error("Docker has returned an error: {} {}".format(response.status, body))
|
||||
raise DockerHttp304Error("Docker has returned an error: {} {}".format(response.status, body))
|
||||
elif response.status == 404:
|
||||
raise DockerHttp404Error("Docker has returned an error: {} {}".format(response.status, body))
|
||||
raise DockerHttp404Error("Docker has returned an error: {} {}".format(response.status, body))
|
||||
else:
|
||||
raise DockerError("Docker has returned an error: {} {}".format(response.status, body))
|
||||
raise DockerError("Docker has returned an error: {} {}".format(response.status, body))
|
||||
return response
|
||||
|
||||
@asyncio.coroutine
|
||||
|
||||
@@ -367,7 +367,7 @@ class DockerVM(BaseVM):
|
||||
"""
|
||||
|
||||
# We can not use the API because docker doesn't expose a websocket api for exec
|
||||
# https://github.com/GNS3/gns3-gui/issues/1039
|
||||
# https://github.com/GNS3/gns3-gui/issues/1039
|
||||
process = yield from asyncio.subprocess.create_subprocess_exec(
|
||||
"docker", "exec", "-i", self._cid, "/gns3/bin/busybox", "script", "-qfc", "/gns3/bin/busybox sh", "/dev/null",
|
||||
stdout=asyncio.subprocess.PIPE,
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#
|
||||
# This script is injected into the container and launch before
|
||||
# the start command of the container
|
||||
# the start command of the container
|
||||
#
|
||||
OLD_PATH="$PATH"
|
||||
PATH=/gns3/bin:/tmp/gns3/bin
|
||||
|
||||
@@ -219,7 +219,7 @@ class Dynamips(BaseManager):
|
||||
continue
|
||||
|
||||
# Release the dynamips ids if we want to reload the same project
|
||||
# later
|
||||
# later
|
||||
if project.id in self._dynamips_ids:
|
||||
del self._dynamips_ids[project.id]
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ class IOUVM(BaseVM):
|
||||
self._path = self.manager.get_abs_image_path(path)
|
||||
|
||||
# In 1.2 users uploaded images to the images roots
|
||||
# after the migration their images are inside images/IOU
|
||||
# after the migration their images are inside images/IOU
|
||||
# but old topologies use old path
|
||||
if "IOU" not in self._path:
|
||||
location, filename = os.path.split(self._path)
|
||||
|
||||
@@ -533,7 +533,7 @@ class Project:
|
||||
if os.path.split(root)[-1:][0] == "project-files":
|
||||
dirs[:] = [d for d in dirs if d not in ("snapshots", "captures")]
|
||||
|
||||
# Ignore log files and OS noise
|
||||
# Ignore log files and OS noise
|
||||
files = [f for f in files if not f.endswith('_log.txt') and not f.endswith('.log') and f != '.DS_Store']
|
||||
|
||||
for file in files:
|
||||
|
||||
@@ -82,8 +82,8 @@ class QemuVM(BaseVM):
|
||||
try:
|
||||
self.qemu_path = qemu_path
|
||||
except QemuError as e:
|
||||
# If the binary is not found for topologies 1.4 and later
|
||||
# search via the platform otherwise use the binary name
|
||||
# If the binary is not found for topologies 1.4 and later
|
||||
# search via the platform otherwise use the binary name
|
||||
if platform:
|
||||
self.platform = platform
|
||||
else:
|
||||
|
||||
@@ -83,8 +83,8 @@ class VirtualBox(BaseManager):
|
||||
@asyncio.coroutine
|
||||
def execute(self, subcommand, args, timeout=60):
|
||||
|
||||
# We use a lock prevent parallel execution due to strange errors
|
||||
# reported by a user and reproduced by us.
|
||||
# We use a lock prevent parallel execution due to strange errors
|
||||
# reported by a user and reproduced by us.
|
||||
# https://github.com/GNS3/gns3-gui/issues/261
|
||||
with (yield from self._execute_lock):
|
||||
vboxmanage_path = self.vboxmanage_path
|
||||
|
||||
Reference in new issue
Block a user