aboutsummaryrefslogtreecommitdiffstats
path: root/uci.py
diff options
context:
space:
mode:
Diffstat (limited to 'uci.py')
-rw-r--r--uci.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/uci.py b/uci.py
index afec6cf..adc8a74 100644
--- a/uci.py
+++ b/uci.py
@@ -26,12 +26,18 @@ def val_or_none(params, key):
def get_uci_key(package, section, type, index, name):
if section:
- key = "{}.{}.{}".format(package, section, name)
+ if name:
+ key = "{}.{}.{}".format(package, section, name)
+ else:
+ key = None
skey = "{}.{}".format(package, section)
return key, skey
elif type and index:
- key = "{}.@{}[{}].{}".format(package, type, index, name)
+ if name:
+ key = "{}.@{}[{}].{}".format(package, type, index, name)
+ else:
+ key = None
skey = "{}.@{}[{}]".format(package, type, index)
return key, skey