mirror of https://github.com/rq/rq.git
Add specifics on the "ImportError" to the message in case of an attribute error.
This commit is contained in:
parent
be8f7684aa
commit
14ecb8e956
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue