Skip to content

Commit 3f86b93

Browse files
authored
Merge pull request matplotlib#7446 from tacaswell/bld_ghtools_oauth
BLD: look for an ghoauth token when using ghtools
2 parents 59c9f36 + f4b2718 commit 3f86b93

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/gh_api.py

+7
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ def get_auth_token():
4343
if token is not None:
4444
return token
4545

46+
try:
47+
with open(os.path.join(os.path.expanduser('~'), '.ghoauth')) as f:
48+
token, = f
49+
return token
50+
except:
51+
pass
52+
4653
import keyring
4754
token = keyring.get_password('github', fake_username)
4855
if token is not None:

0 commit comments

Comments
 (0)