Exemplo n.º 1
0
 def _set_request_timeout(self, kwargs):
     """
     Prepare the kwargs for an HTTP request by inserting the timeout
     parameter, if not already present.  If the timeout is infinite,
     set it to the ``long_timeout`` parameter.
     """
     kwargs = Client._set_request_timeout(self, kwargs)
     if kwargs['timeout'] is None and self._long_timeout is not None:
         kwargs['timeout'] = self._long_timeout.total_seconds()
     return kwargs
Exemplo n.º 2
0
 def _set_request_timeout(self, kwargs):
     """
     Prepare the kwargs for an HTTP request by inserting the timeout
     parameter, if not already present.  If the timeout is infinite,
     set it to the ``long_timeout`` parameter.
     """
     kwargs = Client._set_request_timeout(self, kwargs)
     if kwargs['timeout'] is None and self._long_timeout is not None:
         kwargs['timeout'] = self._long_timeout.total_seconds()
     return kwargs