Skip to content

Commit 826146f

Browse files
committed
fixed return sources
1 parent cd39c59 commit 826146f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

datumaro/components/wrappers.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@ def updated_find_sources_recursive(
2323
path, ext, extractor_name,
2424
filename, dirname, file_filter, max_depth
2525
)
26+
2627
if not sources:
2728
cls._not_found_error_data = {"ext": ext}
2829

30+
return sources
31+
2932
return updated_find_sources_recursive
3033

31-
def wrap_generate_not_found_error(importer):
34+
def wrap_generate_not_found_error():
3235
@classmethod
3336
def updated_generate_not_found_error(cls, path):
3437
return DatasetNotFoundError(path, cls._not_found_error_data.get("ext"))
@@ -37,5 +40,5 @@ def updated_generate_not_found_error(cls, path):
3740

3841
def wrap_importer(importer):
3942
mock.patch.object(importer, '_find_sources_recursive', new=wrap_find_sources_recursive(importer)).start()
40-
mock.patch.object(importer, '_generate_not_found_error', new=wrap_generate_not_found_error(importer)).start()
43+
mock.patch.object(importer, '_generate_not_found_error', new=wrap_generate_not_found_error()).start()
4144
mock.patch.object(importer, '_not_found_error_data', new={"ext": ""}, create=True).start()

0 commit comments

Comments
 (0)