From d56c63b44ac6d3c40826f9e09f2c71454074269b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Ob=C5=AFrka?= Date: Fri, 8 Apr 2016 14:55:22 +0200 Subject: Defaults the index to 0 Then is possible to address unique anonymous section with type only. --- uci.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uci.py b/uci.py index b85f207..0ad3eae 100644 --- a/uci.py +++ b/uci.py @@ -52,7 +52,9 @@ options: index: description: - index of anonymous section + - defaults to 0 so the unique section is possible to access only trough its type required: false + default: 0 item: description: - value is option/list @@ -168,7 +170,7 @@ def main(): package = dict(aliases=["p"], required=True), section = dict(aliases=["s"], required=False), type = dict(required=False), - index = dict(required=False), + index = dict(default="0", required=False), item = dict(default="option", choices=["option", "list"]), state = dict(default="present", choices=["present", "absent"]), create = dict(default="yes", type='bool') -- cgit v1.2.3