mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-12 04:53:52 -06:00
fix: validate_schemas names its jsonschema install
Without jsonschema the documented command stopped on an ImportError traceback. Run as a command it now prints the install pipeline.py names for the same step, with the format-nongpl extra, and exits 1. An import from the tests still raises ImportError, which they skip on.
This commit is contained in:
1 parent
54eac3b2df
commit
9f3f1cec3b
2 files changed
+35
-1
No files matched your search
@@ -14,7 +14,15 @@ from pathlib import Path, PurePosixPath
|
||||
import yaml
|
||||
|
||||
from common import source_yaml_paths, yaml_load
|
||||
from jsonschema import Draft202012Validator, FormatChecker
|
||||
|
||||
try:
|
||||
from jsonschema import Draft202012Validator, FormatChecker
|
||||
except ImportError:
|
||||
# Tests import this module and skip on the ImportError, the command
|
||||
# names the install pipeline.py names for the same step.
|
||||
if __name__ != "__main__":
|
||||
raise
|
||||
sys.exit('Error: jsonschema required (pip install "jsonschema[format-nongpl]")')
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
SCHEMAS = ROOT / "schemas"
|
||||
|
||||
Reference in new issue
Block a user