Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions _validate/createJson.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python

# Copyright (C) 2022-2024 Noelia Ruiz Martínez, NV Access Limited
# Copyright (C) 2022-2025 Noelia Ruiz Martínez, NV Access Limited
# This file may be used under the terms of the GNU General Public License, version 2 or later.
# For more details see: https://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -91,9 +91,8 @@ def _createDictMatchingJsonSchema(
"""Refer to _validate/addonVersion_schema.json"""
try:
addonVersionNumber = MajorMinorPatch.getFromStr(manifest["version"])
except ValueError:
manifest._errors = f"Manifest version invalid {addonVersionNumber}"
raise
except ValueError as e:
raise ValueError(f"Manifest version invalid {addonVersionNumber}") from e

try:
addonData = {
Expand All @@ -116,8 +115,7 @@ def _createDictMatchingJsonSchema(
"license": licenseName,
}
except KeyError as e:
manifest._errors = f"Manifest missing required key '{e.args[0]}'."
raise
raise KeyError(f"Manifest missing required key '{e.args[0]}'.") from e

# Add optional fields
homepage = manifest.get("url")
Expand All @@ -140,8 +138,7 @@ def _createDictMatchingJsonSchema(
}
)
except KeyError as e:
manifest._errors = f"Translation for {langCode} missing required key '{e.args[0]}'."
raise
raise KeyError(f"Translation for {langCode} missing required key '{e.args[0]}'.") from e

return addonData

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ flake8==3.9.2
flake8-tabs==2.2.2

# Requirements for validate
git+https://github.com/DiffSK/configobj@3e2f4cc#egg=configobj
jsonschema==3.1
configobj @ git+https://github.com/DiffSK/configobj@8be54629ee7c26acb5c865b74c76284e80f3aa31#egg=configobj
jsonschema==4.23.0