Fix infinite loop on incorrect input of gateway IP

This commit is contained in:
SecondThundeR 2021-04-20 15:07:52 +03:00
parent 1d37e5a49e
commit 06e846796d
1 changed files with 1 additions and 1 deletions

View File

@ -189,9 +189,9 @@ def ask_to_configure_network():
fg='red'
)
gateway = input('Enter your gateway (router) IP address or leave blank for none: ').strip()
# Implemented new check for correct gateway IP address
while 1:
gateway = input('Enter your gateway (router) IP address or leave blank for none: ').strip()
try:
if len(gateway) == 0:
gateway = None