Update temporary status if project change location

This avoid race condition during file move.
This commit is contained in:
Julien Duponchelle committed 2015-02-05 11:44:51 +01:00
1 parent 8367a9eb30
commit dae48b2de4
2 files changed
+28 -4

No files matched your search

+8
View File
@@ -114,6 +114,7 @@ class Project:
raise aiohttp.web.HTTPForbidden(text="You are not allowed to modifiy the project directory location")
self._path = path
self._update_temporary_file()
@property
def vms(self):
@@ -132,6 +133,13 @@ class Project:
return
self._temporary = temporary
self._update_temporary_file()
def _update_temporary_file(self):
"""
Update the .gns3_temporary file in order to reflect current
project status.
"""
if self._temporary:
try: