mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-11-17 01:04:51 +02:00
Fix a rare crash when a failed node is garbage collected
This commit is contained in:
parent
1e73962e33
commit
0d6adb0620
@ -102,7 +102,7 @@ class BaseNode:
|
||||
|
||||
def __del__(self):
|
||||
|
||||
if self._temporary_directory is not None:
|
||||
if hasattr(self, "_temporary_directory") and self._temporary_directory is not None:
|
||||
if os.path.exists(self._temporary_directory):
|
||||
shutil.rmtree(self._temporary_directory, ignore_errors=True)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user