diff options
author | Ray Holder <ray@blacklocus.com> | 2013-01-22 00:54:10 -0600 |
---|---|---|
committer | Ray Holder <ray@blacklocus.com> | 2013-01-22 00:54:10 -0600 |
commit | e9a0bf4e8fd9aa23edb9ff0002fd698d2ce67b89 (patch) | |
tree | 5cac0b67d7d1195b636940b50846024ef21ce15e /retrying.py | |
parent | f2237dfecd96eddd0c02afd3ddc52a5225315a22 (diff) | |
download | retrying-e9a0bf4e8fd9aa23edb9ff0002fd698d2ce67b89.tar.gz |
Python 3.2 compatibility fix, since we don't have sys.maxint anymore...
Diffstat (limited to 'retrying.py')
-rw-r--r-- | retrying.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/retrying.py b/retrying.py index 59bebc1..55d09ac 100644 --- a/retrying.py +++ b/retrying.py @@ -13,9 +13,11 @@ ## limitations under the License. import random -import sys import time +# sys.maxint / 2, since Python 3.2 doesn't have a sys.maxint... +MAX_WAIT = 1073741823 + def retry(*dargs, **dkw): """ TODO comment @@ -47,7 +49,7 @@ class Retrying: wait_fixed=1000, wait_random_min=0, wait_random_max=1000, wait_incrementing_start=0, wait_incrementing_increment=100, - wait_exponential_multiplier=1, wait_exponential_max=sys.maxint, + wait_exponential_multiplier=1, wait_exponential_max=MAX_WAIT, retry_on_exception=None, retry_on_result=None, wrap_exception=False): |