소스 검색

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