Browse Source

fixed __bool__

Riyad Parvez 11 years ago
parent
commit
1d04b51160
1 changed files with 2 additions and 1 deletions
  1. 2 1
      celery/utils/timer2.py

+ 2 - 1
celery/utils/timer2.py

@@ -135,8 +135,9 @@ class Timer(threading.Thread):
     def __len__(self):
         return len(self.schedule)
 
-    def __nonzero__(self):
+    def __bool__(self):
         return True
+    __nonzero__ = __bool__
 
     @property
     def queue(self):