8000 BLD: look for an ghoauth token when using ghtools · matplotlib/matplotlib@f4b2718 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f4b2718

Browse files
committed
BLD: look for an ghoauth token when using ghtools
1 parent a1b680b commit f4b2718

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/gh_api.py

Lines changed: 7 additions & 0 deletions
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)
0