Pārlūkot izejas kodu

2to3 rewrites obj.next() to next(obj) even if not an iterator

Ask Solem 13 gadi atpakaļ
vecāks
revīzija
1149df44e2
2 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 1 0
      celery/beat.py
  2. 1 0
      celery/utils/timer2.py

+ 1 - 0
celery/beat.py

@@ -87,6 +87,7 @@ class ScheduleEntry(object):
         return self.__class__(**dict(self,
                                      last_run_at=last_run_at or datetime.now(),
                                      total_run_count=self.total_run_count + 1))
+    __next__ = next  # for 2to3
 
     def update(self, other):
         """Update values from another entry.

+ 1 - 0
celery/utils/timer2.py

@@ -173,6 +173,7 @@ class Timer(Thread):
                     self.not_empty.wait(1.0)
                 return delay
         return self.apply_entry(entry)
+    __next__ = next  # for 2to3
 
     def run(self):
         try: