Skip to content

Remove usage of google-api-python-client deps #3232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dvc/remote/gdrive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -210,6 +209,7 @@ def drive(self):
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",
]

Expand Down