From 0d6adb0620ed0f229ce2c54020f33bc96f57c9c6 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Thu, 3 Nov 2016 14:21:28 +0100 Subject: [PATCH] Fix a rare crash when a failed node is garbage collected --- gns3server/compute/base_node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gns3server/compute/base_node.py b/gns3server/compute/base_node.py index 64f1a9d9..0fc90d23 100644 --- a/gns3server/compute/base_node.py +++ b/gns3server/compute/base_node.py @@ -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)