Do not crash on missing token
This commit is contained in:
parent
39a94276d5
commit
bac5dde8b5
|
@ -99,13 +99,8 @@ def _fetch_api_token(session):
|
||||||
# api_token: "xoxs-12345-abcdefg....",
|
# api_token: "xoxs-12345-abcdefg....",
|
||||||
# "api_token":"xoxs-12345-abcdefg....",
|
# "api_token":"xoxs-12345-abcdefg....",
|
||||||
match_group = API_TOKEN_PATTERN.match(line.strip())
|
match_group = API_TOKEN_PATTERN.match(line.strip())
|
||||||
if not match_group:
|
if match_group:
|
||||||
raise ParseError(
|
return match_group.group(1)
|
||||||
"Could not parse API token from remote data! "
|
|
||||||
"Regex requires updating."
|
|
||||||
)
|
|
||||||
|
|
||||||
return match_group.group(1)
|
|
||||||
|
|
||||||
print("No api_token found in page. Search your https://<teamname>.slack.com/customize/emoji "
|
print("No api_token found in page. Search your https://<teamname>.slack.com/customize/emoji "
|
||||||
"page source for \"api_token\" and enter its value manually.")
|
"page source for \"api_token\" and enter its value manually.")
|
||||||
|
|
Loading…
Reference in New Issue