mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-13 13:05:37 +00:00
Only deregister component if the registry still exists
This commit is contained in:
parent
ff087d133c
commit
18ebf5b912
@ -97,7 +97,8 @@ class Component(object):
|
|||||||
_ComponentRegistry.register(self)
|
_ComponentRegistry.register(self)
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
_ComponentRegistry.deregister(self._component_name)
|
if _ComponentRegistry:
|
||||||
|
_ComponentRegistry.deregister(self._component_name)
|
||||||
|
|
||||||
def _component_start_timer(self):
|
def _component_start_timer(self):
|
||||||
if hasattr(self, "update"):
|
if hasattr(self, "update"):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user