Do not crash if we can not cleanup a temporay project

Fix #576
This commit is contained in:
Julien Duponchelle committed 2016-06-15 11:08:31 +02:00
1 parent bb0db7846f
commit 5ca9becdf9
1 file changed
+4 -1
+4 -1
View File
@@ -434,7 +434,10 @@ class Project:
path = os.path.join(directory, project)
if os.path.exists(os.path.join(path, ".gns3_temporary")):
log.warning("Purge old temporary project {}".format(project))
shutil.rmtree(path)
try:
shutil.rmtree(path)
except OSError as e:
log.error("Error when cleaning {}: {}".format(path, str(e)))
def modules(self):
"""