From 18ebf5b912ddbce9d4dbf3994d97759ff7db4cfd Mon Sep 17 00:00:00 2001 From: John Garland Date: Tue, 5 Jul 2011 17:43:55 +1000 Subject: [PATCH] Only deregister component if the registry still exists --- deluge/component.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deluge/component.py b/deluge/component.py index 6d62979f8..8956eb9b7 100644 --- a/deluge/component.py +++ b/deluge/component.py @@ -97,7 +97,8 @@ class Component(object): _ComponentRegistry.register(self) def __del__(self): - _ComponentRegistry.deregister(self._component_name) + if _ComponentRegistry: + _ComponentRegistry.deregister(self._component_name) def _component_start_timer(self): if hasattr(self, "update"):