From b31e453b23873bfcc3f8b29262793d0ca55e9012 Mon Sep 17 00:00:00 2001 From: Marek Czernek Date: Thu, 22 Aug 2024 15:37:47 +0200 Subject: [PATCH] Fail early if port is not numeric --- spacecmd/src/spacecmd/system.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spacecmd/src/spacecmd/system.py b/spacecmd/src/spacecmd/system.py index f032c194f390..5ef4bf1b5540 100644 --- a/spacecmd/src/spacecmd/system.py +++ b/spacecmd/src/spacecmd/system.py @@ -4563,7 +4563,10 @@ def do_system_bootstrap(self, args): if answer in ['y', 'Y']: options.saltssh = True - if isinstance(options.port, str) and options.port.isnumeric(): + if isinstance(options.port, str): + if not options.port.isnumeric(): + logging.error(_N("Provided port must be numeric")) + return 1 options.port = int(options.port) if not options.hostname: