1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Do not crash if we can not cleanup a temporay project

Fix #576
This commit is contained in:
Julien Duponchelle 2016-06-15 11:08:31 +02:00
parent bb0db7846f
commit 5ca9becdf9
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -434,7 +434,10 @@ class Project:
path = os.path.join(directory, project) path = os.path.join(directory, project)
if os.path.exists(os.path.join(path, ".gns3_temporary")): if os.path.exists(os.path.join(path, ".gns3_temporary")):
log.warning("Purge old temporary project {}".format(project)) 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): def modules(self):
""" """