From 76cc1d275065a01598b67e9a7e535df3a86087f0 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 7 May 2016 10:39:32 -0600 Subject: [PATCH] Fixes call to export project. --- gns3server/handlers/api/project_handler.py | 2 +- gns3server/modules/docker/__init__.py | 3 +-- gns3server/modules/project.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gns3server/handlers/api/project_handler.py b/gns3server/handlers/api/project_handler.py index 3c4a0fa2..da0423fe 100644 --- a/gns3server/handlers/api/project_handler.py +++ b/gns3server/handlers/api/project_handler.py @@ -368,7 +368,7 @@ class ProjectHandler: response.content_length = None response.start(request) - for data in project.export(include_images=bool(request.GET.get("images", "0"))): + for data in project.export(include_images=bool(request.GET.get("include_images", "0"))): response.write(data) yield from response.drain() diff --git a/gns3server/modules/docker/__init__.py b/gns3server/modules/docker/__init__.py index be218441..89dc3679 100644 --- a/gns3server/modules/docker/__init__.py +++ b/gns3server/modules/docker/__init__.py @@ -29,7 +29,6 @@ from gns3server.utils import parse_version log = logging.getLogger(__name__) from ..base_manager import BaseManager -from ..project_manager import ProjectManager from .docker_vm import DockerVM from .docker_error import * @@ -59,7 +58,7 @@ class Docker(BaseManager): raise DockerError("Can't connect to docker daemon") if parse_version(version["ApiVersion"]) < parse_version(DOCKER_MINIMUM_API_VERSION): - raise DockerError("Docker API version is {}. But GNS3 require a minimum API version {}".format(version["ApiVersion"], DOCKER_MINIMUM_API_VERSION)) + raise DockerError("Docker API version is {}. GNS3 requires a minimum API version of {}".format(version["ApiVersion"], DOCKER_MINIMUM_API_VERSION)) return self._connector def __del__(self): diff --git a/gns3server/modules/project.py b/gns3server/modules/project.py index c1db86e0..2acbc836 100644 --- a/gns3server/modules/project.py +++ b/gns3server/modules/project.py @@ -594,7 +594,7 @@ class Project: for prop, value in node["properties"].items(): if prop.endswith("image"): node["properties"][prop] = os.path.basename(value) - if include_images: + if include_images is True: self._export_images(value, node["type"], z) z.writestr("project.gns3", json.dumps(topology).encode())