# High probability of failure due to connection atrophy. Make
# sure this request [re]opens a new connection by closing and
# forgetting all cached connections first.
# High probability of failure due to connection atrophy. Make
# sure this request [re]opens a new connection by closing and
# forgetting all cached connections first.
self._last_request_time = time.time()
try:
return self.orig_http_request(uri, **kwargs)
self._last_request_time = time.time()
try:
return self.orig_http_request(uri, **kwargs)
# httplib2 reopens connections when needed.
_logger.debug("Retrying API request in %d s after socket error",
delay, exc_info=True)
# httplib2 reopens connections when needed.
_logger.debug("Retrying API request in %d s after socket error",
delay, exc_info=True)
def _cast_objects_too(value, schema_type):
global _cast_orig
if (type(value) != type('') and
def _cast_objects_too(value, schema_type):
global _cast_orig
if (type(value) != type('') and