From 6410f7ad42973d936755affd9f3757ea4df25e6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Ob=C5=AFrka?= Date: Fri, 8 Apr 2016 14:54:06 +0200 Subject: Fix bug: get_uci_key need module too --- uci.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/uci.py b/uci.py index 92d3631..b85f207 100644 --- a/uci.py +++ b/uci.py @@ -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: -- cgit v1.2.3