diff options
author | Christopher Baines <mail@cbaines.net> | 2015-12-22 14:09:50 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2015-12-22 14:09:50 +0000 |
commit | dff63335f212d32d7c1a4bb5276f2d31f5995ea1 (patch) | |
tree | 4b32f426e18fec38cbfa9468d0dfc0cbf2279363 /urllib3/util/retry.py | |
parent | 2b3d330a120a16e97cecd5163b5d454dcfe38a2b (diff) | |
download | python-urllib3-dff63335f212d32d7c1a4bb5276f2d31f5995ea1.tar python-urllib3-dff63335f212d32d7c1a4bb5276f2d31f5995ea1.tar.gz |
Import python-urllib3_1.13.1.orig.tar.gzupstream/1.13.1upstream
Diffstat (limited to 'urllib3/util/retry.py')
-rw-r--r-- | urllib3/util/retry.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/urllib3/util/retry.py b/urllib3/util/retry.py index 1fb1f23..03a0124 100644 --- a/urllib3/util/retry.py +++ b/urllib3/util/retry.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import time import logging @@ -126,7 +127,7 @@ class Retry(object): self.method_whitelist = method_whitelist self.backoff_factor = backoff_factor self.raise_on_redirect = raise_on_redirect - self._observed_errors = _observed_errors # TODO: use .history instead? + self._observed_errors = _observed_errors # TODO: use .history instead? def new(self, **kw): params = dict( @@ -206,7 +207,8 @@ class Retry(object): return min(retry_counts) < 0 - def increment(self, method=None, url=None, response=None, error=None, _pool=None, _stacktrace=None): + def increment(self, method=None, url=None, response=None, error=None, + _pool=None, _stacktrace=None): """ Return a new Retry object with incremented retry counters. :param response: A response object, or None, if the server did not @@ -274,7 +276,6 @@ class Retry(object): return new_retry - def __repr__(self): return ('{cls.__name__}(total={self.total}, connect={self.connect}, ' 'read={self.read}, redirect={self.redirect})').format( |