Protect against jsonschema / referencing import to include TypeError

This commit is contained in:
allegroai 2024-07-31 17:26:04 +03:00
parent 62dd92a22d
commit 87233dfeac

View File

@ -7,7 +7,7 @@ try:
# Since `referencing`` only supports Python >= 3.8, this try-except blocks maintain support # Since `referencing`` only supports Python >= 3.8, this try-except blocks maintain support
# for earlier python versions. # for earlier python versions.
from referencing.exceptions import Unresolvable from referencing.exceptions import Unresolvable
except ImportError: except (ImportError, TypeError):
from jsonschema.exceptions import RefResolutionError as Unresolvable from jsonschema.exceptions import RefResolutionError as Unresolvable
from .apimodel import ApiModel from .apimodel import ApiModel