Skip to content

Commit

Permalink
prevent exception with older jsonschema versions (#18)
Browse files Browse the repository at this point in the history
* prevent exception with older jsonschema versions
* incremented version to 1.1.2

---------
Co-authored-by: Glen M <glenm@localhost.localdomain>
  • Loading branch information
gmabey committed Jul 6, 2023
1 parent 0578961 commit ec8ac0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sigmf/__init__.py
Expand Up @@ -4,7 +4,7 @@
#
# SPDX-License-Identifier: LGPL-3.0-or-later

__version__ = '1.1.1'
__version__ = '1.1.2'

from .archive import SigMFArchive
from .sigmffile import SigMFFile, SigMFCollection
Expand Down
3 changes: 1 addition & 2 deletions sigmf/validate.py
Expand Up @@ -65,8 +65,7 @@ def validate(metadata, ref_schema=schema.get_schema()):
-------
None, will raise error if invalid.
'''
validator = jsonschema.Draft7Validator(schema=ref_schema)
validator.validate(instance=metadata)
jsonschema.validators.validate(instance=metadata, schema=ref_schema)

# assure capture and annotation order
# TODO: There is a way to do this with just the schema apparently.
Expand Down

0 comments on commit ec8ac0e

Please sign in to comment.