Small fix to raise an exception when no model was found instead of failing later with TypeError: 'int' object is not subscriptable.

pull/43/head
Alexander Pacha 2 years ago
parent c99be55af2
commit 55a9fba677

@ -34,6 +34,8 @@ class SbbBinarizer:
self.start_new_session()
self.model_files = glob('%s/*.h5' % self.model_dir)
if not self.model_files:
raise ValueError(f"No models found in {self.model_dir}")
self.models = []
for model_file in self.model_files:

Loading…
Cancel
Save