Skip to content

Commit

Permalink
Fail early if port is not numeric
Browse files Browse the repository at this point in the history
  • Loading branch information
m-czernek committed Sep 5, 2024
1 parent b4ace38 commit b31e453
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spacecmd/src/spacecmd/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b31e453

Please sign in to comment.