diff --git a/rq/exceptions.py b/rq/exceptions.py index 4fb983d..59c1429 100644 --- a/rq/exceptions.py +++ b/rq/exceptions.py @@ -11,6 +11,6 @@ class NoQueueError(Exception): class UnpickleError(Exception): - def __init__(self, message, raw_data, inner_exception): + def __init__(self, message, raw_data, inner_exception=None): super(UnpickleError, self).__init__(message, inner_exception) self.raw_data = raw_data diff --git a/rq/job.py b/rq/job.py index aebf9eb..2000806 100644 --- a/rq/job.py +++ b/rq/job.py @@ -27,7 +27,7 @@ def unpickle(pickled_string): """ try: obj = loads(pickled_string) - except (StandardError, UnpicklingError), e: + except (StandardError, UnpicklingError) as e: raise UnpickleError('Could not unpickle.', pickled_string, e) return obj