mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-12 12:53:26 +00:00
tests: import munet 0.13.2
fixed ConfigOptionsProxy bug Signed-off-by: Christian Hopps <chopps@labn.net>
This commit is contained in:
parent
ea4163ce49
commit
7d12017bd8
@ -191,17 +191,18 @@ class ConfigOptionsProxy:
|
|||||||
else:
|
else:
|
||||||
self.option = ConfigOptionsProxy.DefNoneObject()
|
self.option = ConfigOptionsProxy.DefNoneObject()
|
||||||
|
|
||||||
def getoption(self, opt, defval=None):
|
def getoption(self, opt, default=None):
|
||||||
if not self.config:
|
if not self.config:
|
||||||
return defval
|
return default
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return self.config.getoption(opt, default=defval)
|
value = self.config.getoption(opt)
|
||||||
|
return value if value is not None else default
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return defval
|
return default
|
||||||
|
|
||||||
def get_option(self, opt, defval=None):
|
def get_option(self, opt, default=None):
|
||||||
return self.getoption(opt, defval)
|
return self.getoption(opt, default)
|
||||||
|
|
||||||
def get_option_list(self, opt):
|
def get_option_list(self, opt):
|
||||||
value = self.get_option(opt, "")
|
value = self.get_option(opt, "")
|
||||||
|
Loading…
Reference in New Issue
Block a user