mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-16 13:46:31 +00:00
Check if a option is missing inside nested lists (#216)
* Update validate.py * fix lint
This commit is contained in:
parent
2df4f80aa5
commit
8a11e6c845
@ -256,6 +256,13 @@ def _nested_validate_list(typ, data_list, key):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
c_options[c_key] = _single_validate(typ[c_key], c_value, c_key)
|
c_options[c_key] = _single_validate(typ[c_key], c_value, c_key)
|
||||||
|
|
||||||
|
# check if all options are exists
|
||||||
|
missing = set(typ) - set(c_options)
|
||||||
|
if missing:
|
||||||
|
raise vol.Invalid(
|
||||||
|
"Missing {} options inside nested list".format(missing))
|
||||||
|
|
||||||
options.append(c_options)
|
options.append(c_options)
|
||||||
# normal list
|
# normal list
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user