summaryrefslogtreecommitdiff
path: root/examples/oldconfig.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/oldconfig.py')
-rw-r--r--examples/oldconfig.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/examples/oldconfig.py b/examples/oldconfig.py
index 570e9f9..d8b21c7 100644
--- a/examples/oldconfig.py
+++ b/examples/oldconfig.py
@@ -134,18 +134,8 @@ def default_value_str(sym):
For string/int/hex, returns the default value as-is.
"""
if sym.type in (BOOL, TRISTATE):
- res = []
-
- if 0 in sym.assignable:
- res.append("N" if sym.tri_value == 0 else "n")
-
- if 1 in sym.assignable:
- res.append("M" if sym.tri_value == 1 else "m")
-
- if 2 in sym.assignable:
- res.append("Y" if sym.tri_value == 2 else "y")
-
- return "/".join(res)
+ return "/".join(("nmy" if sym.tri_value != tri else "NMY")[tri]
+ for tri in sym.assignable)
# string/int/hex
return sym.str_value