Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2020-11-11 20:25:01 +0000
committerAnton Hvornum <anton.feeds+github@gmail.com>2020-11-11 20:25:01 +0000
commit092f2d3240697418185b210f3050d2de53ac2a20 (patch)
tree476321cf291781570bbf61782b49a3a519e27b53
parent065da563fb7e45d9bf90562ee6af522ce6014808 (diff)
Revert gateway to None if the string is zero-len.
-rw-r--r--examples/guided.py3
1 files changed, 2 insertions, 1 deletions
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()):