Skip to content

Commit e954a86

Browse files
committed
Return content if discovery doc exists locally
1 parent 31bf383 commit e954a86

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

googleapiclient/discovery.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,8 @@ def _retrieve_discovery_doc(
385385
# we can attempt to retreive the static discovery document from the library.
386386
if static_discovery:
387387
content = discovery_cache.get_static_doc(serviceName, version)
388+
if content:
389+
return content
388390

389391
# If the content is None, retrieve the discovery doc from the internet
390392
# because it is not in the cache or the static doc directory.

0 commit comments

Comments
 (0)