diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-11-07 20:21:24 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-11-07 20:21:24 +0100 |
commit | 3bb06a5549f4af402fc81a18599097b1fe54b365 (patch) | |
tree | 29b8cfe88045bf0d6467564a62a77b79c475f776 /python/vyos | |
parent | 9e956c0dd654458915f7fa41615ac5dfe6a4bd80 (diff) | |
download | vyos-1x-3bb06a5549f4af402fc81a18599097b1fe54b365.tar.gz vyos-1x-3bb06a5549f4af402fc81a18599097b1fe54b365.zip |
protocols: static: T3680: fix indention and if branch logic
This fixes an indention bug and a wrong if-statememnt from commit 05aa22dc
("protocols: static: T3680: do not delete DHCP received routes")
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/configdict.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py index 998c10bb5..425a2e416 100644 --- a/python/vyos/configdict.py +++ b/python/vyos/configdict.py @@ -324,14 +324,13 @@ def get_dhcp_interfaces(conf, vrf=None): if not dict: return dhcp_interfaces -def check_dhcp(config, ifname): - out = [] - if 'address' in config and 'dhcp' in config['address']: - if 'vrf' in config and vrf is config['vrf']: - out.append(ifname) - else: - out.append(ifname) - return out + def check_dhcp(config, ifname): + out = [] + if 'address' in config and 'dhcp' in config['address']: + if 'vrf' in config: + if vrf is config['vrf']: out.append(ifname) + else: out.append(ifname) + return out for section, interface in dict.items(): for ifname, ifconfig in interface.items(): |