summaryrefslogtreecommitdiff
path: root/src/conf_mode/dns_forwarding.py
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-05-23 16:19:45 +0200
committerDaniil Baturin <daniil@baturin.org>2018-05-23 16:19:45 +0200
commita79b6babd9fc897799eb14fbfcaaf1e8f6cb94d5 (patch)
tree1159c497263e73a726ca8f07b49a1414247cb427 /src/conf_mode/dns_forwarding.py
parent682f8ffdd7cd71b77277719b114d4ca813175da4 (diff)
downloadvyos-1x-a79b6babd9fc897799eb14fbfcaaf1e8f6cb94d5.tar.gz
vyos-1x-a79b6babd9fc897799eb14fbfcaaf1e8f6cb94d5.zip
Use normal assignment by key instead of setdefault() everywhere.
The setdefault() dict object method updates the value only if it's not already set, so it's useless for what we want to do, despite its deceptive name.
Diffstat (limited to 'src/conf_mode/dns_forwarding.py')
-rwxr-xr-xsrc/conf_mode/dns_forwarding.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conf_mode/dns_forwarding.py b/src/conf_mode/dns_forwarding.py
index f5ad2e482..391dc14ea 100755
--- a/src/conf_mode/dns_forwarding.py
+++ b/src/conf_mode/dns_forwarding.py
@@ -118,7 +118,7 @@ def get_config():
dns['domains'].append(domain)
if conf.exists('ignore-hosts-file'):
- dns.setdefault('export_hosts_file', "no")
+ dns['export_hosts_file'] = "no"
if conf.exists('name-server'):
name_servers = conf.return_values('name-server')