Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validator: Don't crash if the de-aliaser hack fails #137

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

konradybcio
Copy link

This can apparently fall off the bike:

SCHEMA Documentation/devicetree/bindings/processed-schema.json Traceback (most recent call last):
File "/home/konrad/.local/bin/dt-mk-schema", line 38, in
schemas = dtschema.DTValidator(args.schemas).schemas
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/dtschema/validator.py", line 373, in init
self.make_property_type_cache()
File "/usr/lib/python3.12/site-packages/dtschema/validator.py", line 460, in make_property_type_cache
self.props, self.pat_props = get_prop_types(self.schemas)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/dtschema/validator.py", line 195, in get_prop_types
del props[r'^[a-z][a-z0-9-]$']
~~~~~^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '^[a-z][a-z0-9\-]
$'
make[2]: *** [Documentation/devicetree/bindings/Makefile:64: Documentation/devicetree/bindings/processed-schema.json] Błąd 1

This can apparently fall off the bike:

SCHEMA  Documentation/devicetree/bindings/processed-schema.json
Traceback (most recent call last):
  File "/home/konrad/.local/bin/dt-mk-schema", line 38, in <module>
    schemas = dtschema.DTValidator(args.schemas).schemas
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/dtschema/validator.py", line 373, in __init__
    self.make_property_type_cache()
  File "/usr/lib/python3.12/site-packages/dtschema/validator.py", line 460, in make_property_type_cache
    self.props, self.pat_props = get_prop_types(self.schemas)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/dtschema/validator.py", line 195, in get_prop_types
    del props[r'^[a-z][a-z0-9\-]*$']
        ~~~~~^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '^[a-z][a-z0-9\\-]*$'
make[2]: *** [Documentation/devicetree/bindings/Makefile:64: Documentation/devicetree/bindings/processed-schema.json] Błąd 1

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
@robherring robherring merged commit d41cf1e into devicetree-org:main Nov 4, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants