コード例 #1
0
 def open(self, fullurl, data=None):
     if self._seekable:
         def bound_open(fullurl, data=None):
             return UserAgentBase.open(self, fullurl, data)
         response = _opener.wrapped_open(
             bound_open, _response.seek_wrapped_response, fullurl, data)
     else:
         response = UserAgentBase.open(self, fullurl, data)
     return response
コード例 #2
0
 def open(self, fullurl, data=None,
          timeout=_sockettimeout._GLOBAL_DEFAULT_TIMEOUT):
     if self._seekable:
         def bound_open(fullurl, data=None,
                        timeout=_sockettimeout._GLOBAL_DEFAULT_TIMEOUT):
             return UserAgentBase.open(self, fullurl, data, timeout)
         response = _opener.wrapped_open(
             bound_open, _response.seek_wrapped_response, fullurl, data,
             timeout)
     else:
         response = UserAgentBase.open(self, fullurl, data)
     return response