Clean GNS3 close if one remote server is down. Fixes #1357.

This commit is contained in:
grossmj committed 2018-08-09 16:59:10 +07:00
1 parent e3c8c9d484
commit a54359d243
3 files changed
+22 -12

No files matched your search

+12
View File
@@ -481,6 +481,18 @@ class Controller:
if compute in project.computes:
yield from project.close()
def compute_has_open_project(self, compute):
"""
Check is compute has a project opened.
:returns: True if a project is open
"""
for project in self._projects.values():
if compute in project.computes and project.status == "opened":
return True
return False
@asyncio.coroutine
def delete_compute(self, compute_id):
"""