From 9213475ba47ee15e155e89026778f42135aead12 Mon Sep 17 00:00:00 2001 From: Thomas Mangin Date: Sat, 29 Feb 2020 00:57:58 +0000 Subject: ifconfig: T2082: fix checking of argument passed --- python/vyos/ifconfig.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python/vyos') diff --git a/python/vyos/ifconfig.py b/python/vyos/ifconfig.py index 71e223a01..b1f9baabe 100644 --- a/python/vyos/ifconfig.py +++ b/python/vyos/ifconfig.py @@ -96,13 +96,13 @@ class Interface: self.config = deepcopy(self.default) self.config['ifname'] = ifname - for k in self.options: - if k not in kargs: + for k in kargs: + if k not in self.options: raise ConfigError('invalid option {} for {}'.format(k,self.__class__)) self.config[k] = kargs[k] for k in self.required: - if k not in self.config: + if k not in kargs: raise ConfigError('missing required option {} for {}'.format(k,self.__class__)) if not os.path.exists('/sys/class/net/{}'.format(self.config['ifname'])): -- cgit v1.2.3