浏览代码

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 = ()
 
     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()