[V3 launcher] token can be an empty string (#1794)

* token can be an empty string

* I like this sytlistically more
This commit is contained in:
Michael H 2018-06-05 15:59:42 -04:00 committed by palmtree5
parent 0dfd8b6453
commit db5d4d5158

View File

@ -124,7 +124,7 @@ def main():
loop.run_until_complete(_get_prefix_and_token(red, tmp_data)) loop.run_until_complete(_get_prefix_and_token(red, tmp_data))
token = os.environ.get("RED_TOKEN", tmp_data["token"]) token = os.environ.get("RED_TOKEN", tmp_data["token"])
prefix = cli_flags.prefix or tmp_data["prefix"] prefix = cli_flags.prefix or tmp_data["prefix"]
if token is None or not prefix: if not (token and prefix):
if cli_flags.no_prompt is False: if cli_flags.no_prompt is False:
new_token = interactive_config(red, token_set=bool(token), prefix_set=bool(prefix)) new_token = interactive_config(red, token_set=bool(token), prefix_set=bool(prefix))
if new_token: if new_token: