Skip to content

Commit

Permalink
Squash me: simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamreis committed Dec 21, 2022
1 parent 313222c commit b206e90
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tui/installer/screens.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,8 +936,9 @@ def nsvalue(answers, id):
answers['manual-nameservers'][1].append(ns2_entry.value())
if ns3_entry.value() != '':
answers['manual-nameservers'][1].append(ns3_entry.value())
if 'net-admin-configuration' in answers and answers['net-admin-configuration'].valid() and not answers['net-admin-configuration'].isDHCP():
answers['net-admin-configuration'].dns = answers['manual-nameservers'][1]
admin_config = answers.get('net-admin-configuration')
if admin_config is not None and admin_config.valid() and not admin_config.isDHCP():
admin_config.dns = answers['manual-nameservers'][1]
else:
answers['manual-nameservers'] = (False, None)

Expand Down

0 comments on commit b206e90

Please sign in to comment.