Guard parsing of CLI args in launcher, setup scripts (#2432)

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
Toby Harradine 2019-02-08 18:08:10 +11:00 committed by GitHub
parent b350ac38dc
commit ec4c325efd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -447,6 +447,7 @@ def main_menu():
def main():
args, flags_to_pass = parse_cli_args()
if not PYTHON_OK:
print(
f"Python {'.'.join(map(str, MIN_PYTHON_VERSION))} is required to run Red, but you "
@ -473,8 +474,6 @@ def main():
run_red(args.instancename, autorestart=args.auto_restart, cliflags=flags_to_pass)
args, flags_to_pass = parse_cli_args()
if __name__ == "__main__":
try:
main()

View File

@ -371,6 +371,7 @@ async def remove_instance_interaction():
def main():
args, _ = parse_cli_args()
if args.delete:
loop = asyncio.get_event_loop()
loop.run_until_complete(remove_instance_interaction())
@ -381,8 +382,6 @@ def main():
basic_setup()
args, _ = parse_cli_args()
if __name__ == "__main__":
try:
main()