From 7288df57b7803fb6ca08ae40aa8a1d7ac683c7c4 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Wed, 11 Nov 2020 20:23:13 +0000 Subject: Fixed DNS logic, since DNS might become [""]. --- examples/guided.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'examples/guided.py') diff --git a/examples/guided.py b/examples/guided.py index 039296c8..ba1a5ac2 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -204,8 +204,11 @@ if nic: fg='red' ) - gateway = input('Enter your gateway (router) IP address or leave blank for none: ').strip() - dns = input('Enter your DNS servers (space separated, blank for none): ').strip().split(' ') + if gateway = input('Enter your gateway (router) IP address or leave blank for none: ').strip() + + dns = None + if len(dns := input('Enter your DNS servers (space separated, blank for none): ').strip()): + dns = dns.split(' ') archinstall.storage['_guided']['network'] = {'nic': nic, 'dhcp': False, 'ip': ip, 'gateway' : gateway, 'dns' : dns} else: -- cgit v1.2.3-70-g09d2