diff options
author | Thomas Bechtold <tbechtold@suse.com> | 2016-03-14 19:17:59 +0100 |
---|---|---|
committer | Thomas Bechtold <tbechtold@suse.com> | 2016-03-14 19:17:59 +0100 |
commit | bb324623419a22fb14da1e22a847b6b09a178aad (patch) | |
tree | 94dc598adf57f737da77b71c16bd4d489880593c /googleapiclient/discovery_cache | |
parent | a42243ce1225bb0c8ba131b1d05deca9c891e02e (diff) | |
download | google-api-python-client-bb324623419a22fb14da1e22a847b6b09a178aad.tar.gz |
Allow using oauth2client versions < 2
Be compatible with older oauth2client versions. This simplifies
the installation (also for downstream) when software needs an older
oauth2client version but also wants to use googleapiclient.
Diffstat (limited to 'googleapiclient/discovery_cache')
-rw-r--r-- | googleapiclient/discovery_cache/file_cache.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/googleapiclient/discovery_cache/file_cache.py b/googleapiclient/discovery_cache/file_cache.py index 8b0301d2f..7526ed935 100644 --- a/googleapiclient/discovery_cache/file_cache.py +++ b/googleapiclient/discovery_cache/file_cache.py @@ -29,7 +29,11 @@ import os import tempfile import threading -from oauth2client.contrib.locked_file import LockedFile +try: + from oauth2client.contrib.locked_file import LockedFile +except ImportError: + # oauth2client < 2.0.0 + from oauth2client.locked_file import LockedFile from . import base from ..discovery_cache import DISCOVERY_DOC_MAX_AGE |