JSON plugin Validator: Validate json_plugin_version option

This commit is contained in:
Amin Ben Romdhane 2024-03-13 15:23:42 +01:00
parent 9f3017176d
commit db7b4780b2

View file

@ -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