mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-25 16:28:11 +00: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