Преглед на файлове

str(Retry) should accept any kind of number

Ask Solem преди 8 години
родител
ревизия
2eccdb7605
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      celery/exceptions.py

+ 1 - 1
celery/exceptions.py

@@ -73,7 +73,7 @@ class Retry(TaskPredicate):
         Exception.__init__(self, exc, when, **kwargs)
 
     def humanize(self):
-        if isinstance(self.when, numbers.Real):
+        if isinstance(self.when, numbers.Number):
             return 'in {0.when}s'.format(self)
         return 'at {0.when}'.format(self)