From 75c1c81e12816e55f70260a1428000cf6ca30e79 Mon Sep 17 00:00:00 2001 From: Richard Neumann Date: Thu, 7 Jan 2021 18:01:17 +0100 Subject: [PATCH] Fixed main loop. --- rcon/console.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rcon/console.py b/rcon/console.py index 39a5487..00a1352 100644 --- a/rcon/console.py +++ b/rcon/console.py @@ -47,7 +47,6 @@ def read_port() -> int: return port print(f'Invalid port: {port}') - continue def read_passwd() -> str: @@ -58,7 +57,6 @@ def read_passwd() -> str: return getpass('Password: ') except KeyboardInterrupt: print() - continue def get_config(host: str, port: int, passwd: str) -> Config: @@ -143,5 +141,6 @@ def rconcmd(host: str, port: int, passwd: str, *, prompt: str = PROMPT): print(MSG_LOGIN_ABORTED) return - while process_input(client, passwd, prompt): - pass + while True: + if not process_input(client, passwd, prompt): + break