diff options
author | Robin Obůrka <r.oburka@gmail.com> | 2016-04-07 00:31:26 +0200 |
---|---|---|
committer | Robin Obůrka <r.oburka@gmail.com> | 2016-04-07 00:55:00 +0200 |
commit | 7c3a34407437e45039385a120df14603f36ab520 (patch) | |
tree | b705f277eef15ac6f943f40ca6506c2ef462f0ce | |
parent | Add more logic into uci_set() (diff) | |
download | ansible-uci-7c3a34407437e45039385a120df14603f36ab520.tar.xz |
Improve info gathering section
-rw-r--r-- | uci.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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": |