Skip to content

Commit

Permalink
support older httplib2 versions, google libs depend on it still
Browse files Browse the repository at this point in the history
  • Loading branch information
shcheklein authored Apr 11, 2020
2 parents 6f9e953 + d0b2552 commit 18537bb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pydrive2/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,12 @@ def _build_http(self):
# This asks httplib2 to exclude 308s from the status codes
# it treats as redirects
# See also: https://stackoverflow.com/a/59850170/298182
http.redirect_codes = http.redirect_codes - {308}
try:
http.redirect_codes = http.redirect_codes - {308}
except AttributeError:
# http.redirect_codes does not exist in previous versions
# of httplib2, so pass
pass
return http

def Authorize(self):
Expand Down

0 comments on commit 18537bb

Please sign in to comment.