From 7d12017bd8e3041a02b71b22efcf59b0ba7c7a6f Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Mon, 24 Apr 2023 09:47:23 -0400 Subject: [PATCH] tests: import munet 0.13.2 fixed ConfigOptionsProxy bug Signed-off-by: Christian Hopps --- tests/topotests/munet/config.py | 13 +++++++------ 1 file 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, "")