diff options
Diffstat (limited to 'retrying.py')
-rw-r--r-- | retrying.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/retrying.py b/retrying.py index b337744..0efd112 100644 --- a/retrying.py +++ b/retrying.py @@ -237,7 +237,10 @@ class Retrying(object): delay_since_first_attempt_ms = int(round(time.time() * 1000)) - start_time if self.stop(attempt_number, delay_since_first_attempt_ms): - raise RetryError(attempt) + if not self._wrap_exception and attempt.has_exception: + raise attempt.get() + else: + raise RetryError(attempt) else: sleep = self.wait(attempt_number, delay_since_first_attempt_ms) time.sleep(sleep / 1000.0) |