Author: andar

Revision: 5548

Log:
        Remove _update method

Diff:
Modified: trunk/deluge/component.py
===================================================================
--- trunk/deluge/component.py   2009-07-25 00:39:25 UTC (rev 5547)
+++ trunk/deluge/component.py   2009-07-25 00:41:20 UTC (rev 5548)
@@ -62,8 +62,8 @@
 
     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 @@
     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 = {}



--~--~---------~--~----~------------~-------~--~----~
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