Only deregister component if registry still exists

This commit is contained in:
John Garland 2011-07-05 17:58:18 +10:00
parent f75ec9d484
commit cf891125e6

View File

@ -99,6 +99,7 @@ class Component(object):
_ComponentRegistry.register(self) _ComponentRegistry.register(self)
def __del__(self): def __del__(self):
if _ComponentRegistry:
_ComponentRegistry.deregister(self) _ComponentRegistry.deregister(self)
def _component_start_timer(self): def _component_start_timer(self):