Browse Source

itermro: Forgot to yield value

Ask Solem 12 years ago
parent
commit
e3da10ac9a
2 changed files with 3 additions and 4 deletions
  1. 1 2
      celery/tests/backends/test_base.py
  2. 2 2
      celery/utils/serialization.py

+ 1 - 2
celery/tests/backends/test_base.py

@@ -11,8 +11,7 @@ from celery.five import items, range
 from celery.result import AsyncResult, GroupResult
 from celery.utils import serialization
 from celery.utils.serialization import subclass_exception
-from celery.utils.serialization import \
-    find_nearest_pickleable_exception as fnpe
+from celery.utils.serialization import find_pickleable_exception as fnpe
 from celery.utils.serialization import UnpickleableExceptionWrapper
 from celery.utils.serialization import get_pickleable_exception as gpe
 

+ 2 - 2
celery/utils/serialization.py

@@ -73,7 +73,7 @@ def itermro(cls, stop):
             # only BaseException and object, from here on down,
             # we don't care about these.
             return
-        yield
+        yield supercls
 
 
 def create_exception_cls(name, module, parent=None):
@@ -150,7 +150,7 @@ def get_pickleable_exception(exc):
         pass
     else:
         return exc
-    nearest = find_nearest_pickleable_exception(exc)
+    nearest = find_pickleable_exception(exc)
     if nearest:
         return nearest
     return UnpickleableExceptionWrapper.from_exception(exc)