Do not crash if we can not cleanup a temporay project

Fix #576
pull/584/head
Julien Duponchelle 8 years ago
parent bb0db7846f
commit 5ca9becdf9
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

@ -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):
"""

Loading…
Cancel
Save