diff options
author | Robin Obůrka <r.oburka@gmail.com> | 2016-04-08 14:54:06 +0200 |
---|---|---|
committer | Robin Obůrka <r.oburka@gmail.com> | 2016-04-08 14:54:06 +0200 |
commit | 6410f7ad42973d936755affd9f3757ea4df25e6c (patch) | |
tree | 62593acde86aeb7c156cb84517b17d9a3f34ff52 /uci.py | |
parent | Add first version of module's documentation (diff) | |
download | ansible-uci-6410f7ad42973d936755affd9f3757ea4df25e6c.tar.xz |
Fix bug: get_uci_key need module too
Diffstat (limited to 'uci.py')
-rw-r--r-- | uci.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -89,7 +89,7 @@ def val_or_none(params, key): return params[key] -def get_uci_key(package, section, type, index, name): +def get_uci_key(module, package, section, type, index, name): if section: if name: key = "{}.{}.{}".format(package, section, name) @@ -193,12 +193,13 @@ def main(): state = val_or_none(p, "state") create = val_or_none(p, "create") + ## Report unimplemented features if item == "list": module.fail_json(msg="Item of type 'list' is unimplemented for now") ## Get key and value - I need to make decisions - key, skey = get_uci_key(package, section, type, index, name) + key, skey = get_uci_key(module, package, section, type, index, name) if key: val = uci_get(module, bin_path, key) else: |