Skip to content

Commit

Permalink
Skip unimplemented loaders
Browse files Browse the repository at this point in the history
  • Loading branch information
kg583 committed Jun 13, 2024
1 parent c10d988 commit 4af5ecf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tivars/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,12 @@ def load(self, data):
"""
for loader_types, loader in self.loaders.items():
if any(isinstance(data, loader_type) for loader_type in loader_types):
loader(self, data)
return
try:
loader(self, data)
return

except NotImplementedError:
continue

raise TypeError(f"could not find valid loader for type {type(data)}")

Expand Down

0 comments on commit 4af5ecf

Please sign in to comment.