Преглед изворни кода

New AsyncResult.__eq__ broke join_native

Ask Solem пре 13 година
родитељ
комит
326ea1eca7
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      celery/result.py

+ 3 - 1
celery/result.py

@@ -202,7 +202,9 @@ class AsyncResult(ResultBase):
 
 
     def __eq__(self, other):
     def __eq__(self, other):
         if isinstance(other, AsyncResult):
         if isinstance(other, AsyncResult):
-            return self.id == other.id
+            return other.id == self.id
+        elif isinstance(other, basestring):
+            return other == self.id
         return NotImplemented
         return NotImplemented
 
 
     def __copy__(self):
     def __copy__(self):