diff --git a/rq/job.py b/rq/job.py index 50ab65e..dc41bad 100644 --- a/rq/job.py +++ b/rq/job.py @@ -15,6 +15,9 @@ def unpickle(pickled_string): """ try: obj = loads(pickled_string) + except AttributeError as e: + raise UnpickleError('Could not unpickle: %s' % e.message, + pickled_string) except (StandardError, UnpicklingError): raise UnpickleError('Could not unpickle.', pickled_string) return obj diff --git a/tests/test_worker.py b/tests/test_worker.py index 2ab8019..13f3e8f 100644 --- a/tests/test_worker.py +++ b/tests/test_worker.py @@ -52,7 +52,6 @@ class TestWorker(RQTestCase): w = Worker([q]) w.work(burst=True) # should silently pass self.assertEquals(q.count, 0) - self.assertEquals(failed_q.count, 1) def test_work_fails(self):