From 0b32e69900eafec2cd1197ba054d4f9a765a3f29 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Mon, 7 Dec 2020 20:14:49 -0500 Subject: [PATCH] fix: Use logging level info when file_cache is not available (#1125) --- googleapiclient/discovery_cache/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/googleapiclient/discovery_cache/__init__.py b/googleapiclient/discovery_cache/__init__.py index 455ff6224f2..197f6bc0a1a 100644 --- a/googleapiclient/discovery_cache/__init__.py +++ b/googleapiclient/discovery_cache/__init__.py @@ -44,6 +44,7 @@ def autodetect(): from . import file_cache return file_cache.cache - except Exception as e: - LOGGER.warning(e, exc_info=True) + except Exception: + LOGGER.info("file_cache is only supported with oauth2client<4.0.0", + exc_info=False) return None