Module: deluge
Branch: 1.3-stable
Commit: 18ebf5b912ddbce9d4dbf3994d97759ff7db4cfd

Author: John Garland <[email protected]>
Date:   Tue Jul  5 17:43:55 2011 +1000

Only deregister component if the registry still exists

---

 deluge/component.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/deluge/component.py b/deluge/component.py
index 6d62979..8956eb9 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"):

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to