From 092f2d3240697418185b210f3050d2de53ac2a20 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Wed, 11 Nov 2020 20:25:01 +0000 Subject: Revert gateway to None if the string is zero-len. --- examples/guided.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/guided.py b/examples/guided.py index 2f22bf6a..84045b83 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -204,7 +204,8 @@ if nic: fg='red' ) - if gateway = input('Enter your gateway (router) IP address or leave blank for none: ').strip() + if not len(gateway := input('Enter your gateway (router) IP address or leave blank for none: ').strip()): + gateway = None dns = None if len(dns := input('Enter your DNS servers (space separated, blank for none): ').strip()): -- cgit v1.2.3-70-g09d2