From 7c3a34407437e45039385a120df14603f36ab520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Ob=C5=AFrka?= Date: Thu, 7 Apr 2016 00:31:26 +0200 Subject: Improve info gathering section --- uci.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/uci.py b/uci.py index 883c17f..ab9397a 100644 --- a/uci.py +++ b/uci.py @@ -134,7 +134,13 @@ def main(): ## Get key and value - I need to make decisions key, skey = get_uci_key(package, section, type, index, name) - val = uci_get(module, bin_path, key) + if key: + val = uci_get(module, bin_path, key) + else: + val = None + + if not val: + sval = uci_get(module, bin_path, skey) ## Handle deletes if state == "absent": -- cgit v1.2.3