Remove _update method

This commit is contained in:
Andrew Resch 2009-07-25 00:41:20 +00:00
parent 25f96f57bb
commit 22a982430c
1 changed files with 2 additions and 12 deletions

View File

@ -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 = {}