mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Do not require the local server param to open a .gns3 file. Fixes https://github.com/GNS3/gns3-gui/issues/2421 Ref #1460
This commit is contained in:
1 parent
16fcf6141e
commit
ab4d964d69
3 files changed
+9
-8
No files matched your search
@@ -519,6 +519,9 @@ class Controller:
|
||||
:param load: Load the topology
|
||||
"""
|
||||
|
||||
if not os.path.exists(path):
|
||||
raise ControllerError(f"'{path}' does not exist on the controller")
|
||||
|
||||
topo_data = load_topology(path)
|
||||
topo_data.pop("topology")
|
||||
topo_data.pop("version")
|
||||
@@ -529,7 +532,10 @@ class Controller:
|
||||
project = self._projects[topo_data["project_id"]]
|
||||
else:
|
||||
project = await self.add_project(
|
||||
path=os.path.dirname(path), status="closed", filename=os.path.basename(path), **topo_data
|
||||
path=os.path.dirname(path),
|
||||
status="closed",
|
||||
filename=os.path.basename(path),
|
||||
**topo_data
|
||||
)
|
||||
if load or project.auto_open:
|
||||
await project.open()
|
||||
|
||||
Reference in new issue
Block a user