mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
JSON plugin Validator: Validate json_plugin_version option
This commit is contained in:
parent
9f3017176d
commit
db7b4780b2
1 changed files with 4 additions and 0 deletions
|
|
@ -318,6 +318,10 @@ except ValueError:
|
|||
for __key, __value in json_data.items():
|
||||
|
||||
if __key == "json_plugin_version":
|
||||
|
||||
if not isinstance(__value, int) or __value not in [0, 1, 2]:
|
||||
raise ValueError("Invalid value for json_plugin_version")
|
||||
|
||||
JSON_PLUGIN_VERSION = __value
|
||||
continue
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue