ソースを参照

Fix Python 3 issue.

Ionel Cristian Mărieș 11 年 前
コミット
4e79739b99
1 ファイル変更1 行追加1 行削除
  1. 1 1
      celery/concurrency/workhorse.py

+ 1 - 1
celery/concurrency/workhorse.py

@@ -76,7 +76,7 @@ class Workhorse(object):
     _children = ()
     _children = ()
 
 
     def __init__(self, target, args, kwargs):
     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.stdout.flush()
         sys.stderr.flush()
         sys.stderr.flush()
         self.pid = os.fork()
         self.pid = os.fork()