Skip to content

Commit

Permalink
fix ModuleNotFoundError
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-datamaran committed Aug 10, 2020
1 parent 49001f7 commit fec320d
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 fec320d

Please sign in to comment.