Template
Update token call
This commit is contained in:
1 parent
94e2505ba5
commit
06332996fc
1 file changed
+6
-2
@@ -7,8 +7,12 @@ from github import Github
|
|||||||
|
|
||||||
def read_token():
|
def read_token():
|
||||||
token_file = Path(os.getcwd(), 'tests', 'token.txt')
|
token_file = Path(os.getcwd(), 'tests', 'token.txt')
|
||||||
with open(token_file, 'r') as f:
|
if token_file.exists():
|
||||||
token = f.read()
|
with open(token_file, 'r') as f:
|
||||||
|
token = f.read()
|
||||||
|
|
||||||
|
else:
|
||||||
|
token = os.environ.get('token')
|
||||||
|
|
||||||
return token
|
return token
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user