We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b413839 + 11760c0 commit 1cc1911Copy full SHA for 1cc1911
ads/common/auth.py
@@ -889,11 +889,12 @@ def _read_security_token_file(self, security_token_file: str) -> str:
889
str:
890
Security token string.
891
"""
892
- if not os.path.isfile(security_token_file):
+ expanded_path = os.path.expanduser(security_token_file)
893
+ if not os.path.isfile(expanded_path):
894
raise ValueError("Invalid `security_token_file`. Specify a valid path.")
895
try:
896
token = None
- with open(security_token_file, 'r') as f:
897
+ with open(expanded_path, 'r') as f:
898
token = f.read()
899
return token
900
except:
0 commit comments