Skip to content

Commit 6a186b9

Browse files
committed
Merge pull request jazzband#323 from spectras/multistorage_fix
PipelineStorage.listdir short-circuit returning the first match only
2 parents f78a3ee + 6801cc7 commit 6a186b9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pipeline/storage.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,17 @@ def exists(self, name):
128128
return exists
129129

130130
def listdir(self, path):
131+
directories, files = [], []
131132
for finder in self.finders.get_finders():
132133
for storage in finder.storages.values():
133134
try:
134-
return storage.listdir(path)
135+
new_directories, new_files = storage.listdir(path)
135136
except OSError:
136137
pass
138+
else:
139+
directories.extend(new_directories)
140+
files.extend(new_files)
141+
return directories, files
137142

138143
def find_storage(self, name):
139144
for finder in self.finders.get_finders():

0 commit comments

Comments
 (0)