]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: import munet 0.13.2
authorChristian Hopps <chopps@labn.net>
Mon, 24 Apr 2023 13:47:23 +0000 (09:47 -0400)
committerChristian Hopps <chopps@labn.net>
Mon, 24 Apr 2023 13:48:26 +0000 (09:48 -0400)
fixed ConfigOptionsProxy bug

Signed-off-by: Christian Hopps <chopps@labn.net>
tests/topotests/munet/config.py

index 1b02f2e8ff166273c8b803634ef51f1a400ff168..2870ae615c137b79a61ce7314801247a73c8445b 100644 (file)
@@ -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, "")