ソースを参照

Builtin apply() is deprecated, avoid using it.

Branko Čibej 14 年 前
コミット
5b98ad75ee
1 ファイル変更2 行追加1 行削除
  1. 2 1
      celery/result.py

+ 2 - 1
celery/result.py

@@ -447,7 +447,8 @@ class EagerResult(BaseAsyncResult):
                                  self._state, self._traceback))
 
     def __copy__(self):
-        return apply(*self.__reduce__())
+        cls, attrs = self.__reduce__()
+        return cls(*attrs)
 
     def successful(self):
         """Returns :const:`True` if the task executed without failure."""