Restore support for zero instance filtering in binary cnf store queries
[pyi2ncommon] / src / cnfvar / binary.py
index 63311cc..d707daa 100644 (file)
@@ -105,7 +105,8 @@ class CnfBinary:
         elif instance is not None and not isinstance(instance, int):
             raise TypeError(f"`instance` is of wrong type {type(instance)}")
 
-        cmd = f"{BIN_GET_CNF} {name or ''} {instance or ''}"
+        # make sure 0 instance cnfvars like e.g. NICs can also be filtered by instance
+        cmd = f"{BIN_GET_CNF} {name or ''} {instance if instance is not None else ''}"
 
         encoding = ENCODING
         if no_children: