Merge pull request #3232 from iterative/2865

Remove usage of google-api-python-client deps
This commit is contained in:
Ruslan Kuprieiev
2020-01-24 18:02:24 +02:00
committed by GitHub
+2 -2
View File
@@ -33,12 +33,11 @@ class GDriveMissedCredentialKeyError(DvcException):
@decorator
def _wrap_pydrive_retriable(call):
from apiclient import errors
from pydrive2.files import ApiRequestError
try:
result = call()
except (ApiRequestError, errors.HttpError) as exception:
except ApiRequestError as exception:
retry_codes = ["403", "500", "502", "503", "504"]
if any(
"HttpError {}".format(code) in str(exception)
@@ -210,6 +209,7 @@ class RemoteGDrive(RemoteBASE):
GoogleAuth.DEFAULT_SETTINGS["get_refresh_token"] = True
GoogleAuth.DEFAULT_SETTINGS["oauth_scope"] = [
"https://www.googleapis.com/auth/drive",
# drive.appdata grants access to appDataFolder GDrive directory
"https://www.googleapis.com/auth/drive.appdata",
]