Explorar el Código

New AsyncResult.__eq__ broke join_native

Ask Solem hace 13 años
padre
commit
326ea1eca7
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      celery/result.py

+ 3 - 1
celery/result.py

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