From 4af5ecfaf4068bd98a3ae7008902ca4270dd2e14 Mon Sep 17 00:00:00 2001 From: KG Date: Thu, 13 Jun 2024 00:27:28 -0500 Subject: [PATCH] Skip unimplemented loaders --- tivars/data.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tivars/data.py b/tivars/data.py index d928ed2..8f7c090 100644 --- a/tivars/data.py +++ b/tivars/data.py @@ -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)}")