Permalink
Browse files

Fixed bug on 'raise exc'

At line 572: raise exc() has to be raise exc since exc is an instance not a class
  • Loading branch information...
Andrea Rabbaglietti
Andrea Rabbaglietti committed Sep 27, 2014
1 parent 3bacb18 commit 2493576c753eb493c808401dafa49e9b4af76ef9
Showing with 1 addition and 1 deletion.
  1. +1 −1 celery/app/task.py
View
@@ -569,7 +569,7 @@ def retry(self, args=None, kwargs=None, exc=None, throw=True,
# first try to reraise the original exception
maybe_reraise()
# or if not in an except block then raise the custom exc.
raise exc()
raise exc
raise self.MaxRetriesExceededError(
"Can't retry {0}[{1}] args:{2} kwargs:{3}".format(
self.name, request.id, S.args, S.kwargs))

0 comments on commit 2493576

Please sign in to comment.