Parcourir la source

Fix Python 3 issue.

Ionel Cristian Mărieș il y a 11 ans
Parent
commit
4e79739b99
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      celery/concurrency/workhorse.py

+ 1 - 1
celery/concurrency/workhorse.py

@@ -76,7 +76,7 @@ class Workhorse(object):
     _children = ()
 
     def __init__(self, target, args, kwargs):
-        self._name = self.name = 'Workhorse-%s' % Workhorse._counter.next()
+        self._name = self.name = 'Workhorse-%s' % next(Workhorse._counter)
         sys.stdout.flush()
         sys.stderr.flush()
         self.pid = os.fork()