Merge "Updated auth to accept full paths for credential cache file"
diff --git a/internal/lib/auth.py b/internal/lib/auth.py
index 5066878..63a118e 100644
--- a/internal/lib/auth.py
+++ b/internal/lib/auth.py
@@ -112,7 +112,7 @@
" error message: %s" % (json_private_key_path, str(e)))
-class RunFlowFlags(object):
+class RunFlowFlags():
"""Flags for oauth2client.tools.run_flow."""
def __init__(self, browser_auth):
@@ -201,14 +201,17 @@
return _CreateOauthServiceAccountCredsWithJsonKey(
acloud_config.service_account_json_private_key_path,
scopes=scopes)
- elif acloud_config.service_account_private_key_path:
+ if acloud_config.service_account_private_key_path:
return _CreateOauthServiceAccountCreds(
acloud_config.service_account_name,
acloud_config.service_account_private_key_path,
scopes=scopes)
- creds_cache_file = os.path.join(HOME_FOLDER,
- acloud_config.creds_cache_file)
+ if os.path.isabs(acloud_config.creds_cache_file):
+ creds_cache_file = acloud_config.creds_cache_file
+ else:
+ creds_cache_file = os.path.join(HOME_FOLDER,
+ acloud_config.creds_cache_file)
return _CreateOauthUserCreds(
creds_cache_file=creds_cache_file,
client_id=acloud_config.client_id,