From 22a982430cb7799a2bbd54203964eba5a136d3c5 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sat, 25 Jul 2009 00:41:20 +0000 Subject: [PATCH] Remove _update method --- deluge/component.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/deluge/component.py b/deluge/component.py index d50d64295..764c38609 100644 --- a/deluge/component.py +++ b/deluge/component.py @@ -62,8 +62,8 @@ class Component(object): def _start(self): self._state = COMPONENT_STATE.index("Started") - if self._update(): - self._timer = LoopingCall(self._update) + if hasattr(self, "update"): + self._timer = LoopingCall(self.update) self._timer.start(self._interval) def stop(self): @@ -89,16 +89,6 @@ class Component(object): def shutdown(self): pass - def _update(self): - try: - self.update() - except AttributeError: - # This will stop the timer since the component doesn't have an - # update method. - return False - return True - - class ComponentRegistry: def __init__(self): self.components = {}