mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-18 23:38:17 +00:00
Strip user from compute in topology and return project filename
This commit is contained in:
@ -322,12 +322,14 @@ class Project:
|
||||
raise aiohttp.web.HTTPInternalServerError(text="Could not create project directory: {}".format(e))
|
||||
return path
|
||||
|
||||
def _topology_file(self):
|
||||
def _filename(self):
|
||||
if self.name is None:
|
||||
filename = "untitled.gns3"
|
||||
return "untitled.gns3"
|
||||
else:
|
||||
filename = self.name + ".gns3"
|
||||
return os.path.join(self.path, filename)
|
||||
return self.name + ".gns3"
|
||||
|
||||
def _topology_file(self):
|
||||
return os.path.join(self.path, self._filename())
|
||||
|
||||
@asyncio.coroutine
|
||||
def open(self):
|
||||
@ -371,5 +373,6 @@ class Project:
|
||||
"name": self._name,
|
||||
"project_id": self._id,
|
||||
"path": self._path,
|
||||
"filename": self._filename(),
|
||||
"status": self._status
|
||||
}
|
||||
|
Reference in New Issue
Block a user