Commit d9bebf46 by Łukasz Mierzwa

don't fail on finders without storages attribute

parent 3e2cd9b8
...@@ -131,14 +131,19 @@ class BaseFinderStorage(PipelineStorage): ...@@ -131,14 +131,19 @@ class BaseFinderStorage(PipelineStorage):
def listdir(self, path): def listdir(self, path):
directories, files = [], [] directories, files = [], []
for finder in self.finders.get_finders(): for finder in self.finders.get_finders():
for storage in finder.storages.values(): try:
try: storages = finder.storages.values()
new_directories, new_files = storage.listdir(path) except AttributeError:
except OSError: continue
pass else:
else: for storage in storages:
directories.extend(new_directories) try:
files.extend(new_files) new_directories, new_files = storage.listdir(path)
except OSError:
pass
else:
directories.extend(new_directories)
files.extend(new_files)
return directories, files return directories, files
def find_storage(self, name): def find_storage(self, name):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment