summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2023-04-24 09:47:23 -0400
committerChristian Hopps <chopps@labn.net>2023-04-24 09:48:26 -0400
commit7d12017bd8e3041a02b71b22efcf59b0ba7c7a6f (patch)
tree65670f9930ef1e22697d52643841aa0a8b3bac9f
parentea4163ce49b82b4eadb4b78af95a741d132cbcc0 (diff)
tests: import munet 0.13.2
fixed ConfigOptionsProxy bug Signed-off-by: Christian Hopps <chopps@labn.net>
-rw-r--r--tests/topotests/munet/config.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/topotests/munet/config.py b/tests/topotests/munet/config.py
index 1b02f2e8ff..2870ae615c 100644
--- a/tests/topotests/munet/config.py
+++ b/tests/topotests/munet/config.py
@@ -191,17 +191,18 @@ class ConfigOptionsProxy:
else:
self.option = ConfigOptionsProxy.DefNoneObject()
- def getoption(self, opt, defval=None):
+ def getoption(self, opt, default=None):
if not self.config:
- return defval
+ return default
try:
- return self.config.getoption(opt, default=defval)
+ value = self.config.getoption(opt)
+ return value if value is not None else default
except ValueError:
- return defval
+ return default
- def get_option(self, opt, defval=None):
- return self.getoption(opt, defval)
+ def get_option(self, opt, default=None):
+ return self.getoption(opt, default)
def get_option_list(self, opt):
value = self.get_option(opt, "")