aboutsummaryrefslogtreecommitdiff
path: root/urllib3/util/timeout.py
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2015-12-22 14:15:26 +0000
committerChristopher Baines <mail@cbaines.net>2015-12-22 14:15:26 +0000
commit6b4e166f2475c4be0df7d82dc4d86aa43c6cb066 (patch)
treeeb8f0fa0ed67f14cc5c5645f6bb12494e7966e98 /urllib3/util/timeout.py
parentb6983c7c258a0ce3365f7c7409f2a06a8ed70bca (diff)
parent24ae6ba32069ca15f4a163e386964a3accdccf63 (diff)
downloadpython-urllib3-6b4e166f2475c4be0df7d82dc4d86aa43c6cb066.tar
python-urllib3-6b4e166f2475c4be0df7d82dc4d86aa43c6cb066.tar.gz
merge patched into master
Diffstat (limited to 'urllib3/util/timeout.py')
-rw-r--r--urllib3/util/timeout.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/urllib3/util/timeout.py b/urllib3/util/timeout.py
index ea7027f..ff62f47 100644
--- a/urllib3/util/timeout.py
+++ b/urllib3/util/timeout.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
# The default socket timeout, used by httplib to indicate that no timeout was
# specified by the user
from socket import _GLOBAL_DEFAULT_TIMEOUT
@@ -9,6 +10,7 @@ from ..exceptions import TimeoutStateError
# urllib3
_Default = object()
+
def current_time():
"""
Retrieve the current time. This function is mocked out in unit testing.
@@ -226,9 +228,9 @@ class Timeout(object):
has not yet been called on this object.
"""
if (self.total is not None and
- self.total is not self.DEFAULT_TIMEOUT and
- self._read is not None and
- self._read is not self.DEFAULT_TIMEOUT):
+ self.total is not self.DEFAULT_TIMEOUT and
+ self._read is not None and
+ self._read is not self.DEFAULT_TIMEOUT):
# In case the connect timeout has not yet been established.
if self._start_connect is None:
return self._read