Skip to content

Commit

Permalink
Merge pull request #4 from chozelinek/fix-import-error
Browse files Browse the repository at this point in the history
fix ModuleNotFoundError
  • Loading branch information
tanaikech authored Aug 11, 2020
2 parents 49001f7 + fec320d commit 29741c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions getfilelistpy/getfilelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ def __getService(self, resource):
if "oauth2" in resource.keys():
creds = resource["oauth2"]
if hasattr(creds, 'credentials') and not hasattr(creds, '_refresh_token'):
return obuild(api, version, http=creds)
return obuild(api, version, http=creds, cache_discovery=False)
if not hasattr(creds, 'credentials') and hasattr(creds, '_refresh_token'):
return build(api, version, credentials=creds)
return build(api, version, credentials=creds, cache_discovery=False)
if "api_key" in resource.keys():
return build(api, version, developerKey=resource["api_key"])
return build(api, version, developerKey=resource["api_key"], cache_discovery=False)
if "service_account" in resource.keys():
return build(api, version, credentials=resource["service_account"])
return build(api, version, credentials=resource["service_account"], cache_discovery=False)
try:
raise ValueError(
"Error: You can use API key, OAuth2 and Service account.")
Expand Down

0 comments on commit 29741c0

Please sign in to comment.