diff --git a/doc/arm/_ext/iscconf.py b/doc/arm/_ext/iscconf.py index b5bd966e2a..1ecd37cb8b 100644 --- a/doc/arm/_ext/iscconf.py +++ b/doc/arm/_ext/iscconf.py @@ -47,6 +47,8 @@ def split_csv(argument, required): "a non-empty list required; provide at least one value or remove" " this option" ) + if not len(outlist) == len(set(outlist)): + raise ValueError("duplicate value detected") return outlist @@ -73,10 +75,8 @@ def domain_factory(domainname, domainlabel, todolist, grammar): def run(self): placeholder = todolist("") - placeholder["isc_filter_tags"] = set(self.options.get("filter_tags", [])) - placeholder["isc_filter_blocks"] = set( - self.options.get("filter_blocks", []) - ) + placeholder["isc_filter_tags"] = self.options.get("filter_tags", []) + placeholder["isc_filter_blocks"] = self.options.get("filter_blocks", []) return [placeholder] class ISCConfDomain(Domain): @@ -127,7 +127,7 @@ def domain_factory(domainname, domainlabel, todolist, grammar): @property def isc_tags(self): - return set(self.options.get("tags", [])) + return self.options.get("tags", []) @property def isc_short(self): @@ -475,11 +475,11 @@ def domain_factory(domainname, domainlabel, todolist, grammar): lambda item: ( ( not acceptable_tags - or item["tags"].intersection(acceptable_tags) + or set(item["tags"]).intersection(acceptable_tags) ) and ( not acceptable_blocks - or item["block_names"].intersection( + or set(item["block_names"]).intersection( acceptable_blocks ) )