Explorar o código

schedules.crontab: "Invalid crontab pattern. Valid range is 0-24. '24' was found.", need to show ``max_ - 1``.

Ask Solem %!s(int64=14) %!d(string=hai) anos
pai
achega
e7e463b423
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      celery/schedules.py

+ 1 - 1
celery/schedules.py

@@ -209,7 +209,7 @@ class crontab(schedule):
             if number >= max_:
                 raise ValueError(
                         "Invalid crontab pattern. Valid "
-                        "range is 0-%d. '%d' was found." % (max_, number))
+                        "range is 0-%d. '%d' was found." % (max_ - 1, number))
 
         return result