From 3bb06a5549f4af402fc81a18599097b1fe54b365 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 7 Nov 2021 20:21:24 +0100 Subject: 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") --- python/vyos/configdict.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'python') 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(): -- cgit v1.2.3