~ubuntu-branches/debian/stretch/electrum/stretch

« back to all changes in this revision

Viewing changes to packages/requests/packages/urllib3/util/timeout.py

  • Committer: Package Import Robot
  • Author(s): Tristan Seligmann
  • Date: 2016-04-04 03:02:39 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20160404030239-0szgkio8yryjv7c9
Tags: 2.6.3-1
* New upstream release.
  - Drop backported install-wizard-connect.patch.
* Add Suggests: python-zbar and update the installation hint to suggest
  apt-get instead of pip (closes: #819517).
* Bump Standards-Version to 3.9.7 (no changes).
* Update Vcs-* links.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from __future__ import absolute_import
1
2
# The default socket timeout, used by httplib to indicate that no timeout was
2
3
# specified by the user
3
4
from socket import _GLOBAL_DEFAULT_TIMEOUT
9
10
# urllib3
10
11
_Default = object()
11
12
 
 
13
 
12
14
def current_time():
13
15
    """
14
16
    Retrieve the current time. This function is mocked out in unit testing.
226
228
            has not yet been called on this object.
227
229
        """
228
230
        if (self.total is not None and
229
 
            self.total is not self.DEFAULT_TIMEOUT and
230
 
            self._read is not None and
231
 
            self._read is not self.DEFAULT_TIMEOUT):
 
231
                self.total is not self.DEFAULT_TIMEOUT and
 
232
                self._read is not None and
 
233
                self._read is not self.DEFAULT_TIMEOUT):
232
234
            # In case the connect timeout has not yet been established.
233
235
            if self._start_connect is None:
234
236
                return self._read