summaryrefslogtreecommitdiff
path: root/retrying.py
diff options
context:
space:
mode:
authorRay Holder <ray@blacklocus.com>2013-03-20 01:39:37 -0500
committerRay Holder <ray@blacklocus.com>2013-03-20 01:39:37 -0500
commit8035a32c1bb8f80150498017b1e35815b01790e9 (patch)
tree355b8c196fbd2adfb99acb0a8a80a66fbb50f719 /retrying.py
parenta7a6a432530400a67ed33416b5e76727217738fa (diff)
downloadretrying-8035a32c1bb8f80150498017b1e35815b01790e9.tar.gz
fixed a bug where classes not extending from the Python exception hierarchy could slip through, preparing for 1.0.1 release
Diffstat (limited to 'retrying.py')
-rw-r--r--retrying.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/retrying.py b/retrying.py
index 55d09ac..c624d09 100644
--- a/retrying.py
+++ b/retrying.py
@@ -13,6 +13,7 @@
## limitations under the License.
import random
+import sys
import time
# sys.maxint / 2, since Python 3.2 doesn't have a sys.maxint...
@@ -150,7 +151,8 @@ class Retrying:
while True:
try:
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
- except BaseException as e:
+ except:
+ e = sys.exc_info()[1]
attempt = Attempt(e, attempt_number, True)
if not self.should_reject(attempt):