Commit 48f92bc2 by Timothée Peignier

Merge pull request #334 from prymitive/dajaxice_fix

don't fail on finders without storages attribute
parents 834a0337 d9bebf46
......@@ -131,14 +131,19 @@ class BaseFinderStorage(PipelineStorage):
def listdir(self, path):
directories, files = [], []
for finder in self.finders.get_finders():
for storage in finder.storages.values():
try:
new_directories, new_files = storage.listdir(path)
except OSError:
pass
else:
directories.extend(new_directories)
files.extend(new_files)
try:
storages = finder.storages.values()
except AttributeError:
continue
else:
for storage in storages:
try:
new_directories, new_files = storage.listdir(path)
except OSError:
pass
else:
directories.extend(new_directories)
files.extend(new_files)
return directories, files
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