cyberdelia/django-pipeline — pull request #379 by nshafer (2014-10-18 18:03:04+00:00)
Title: Fixed exception on missing files with 2 extensions

If there's a request for a file with 2 extensions, such as "style.css.map" the CachedFileFinder will recursively try to find "style.map" which probably doesn't exist. This is fine, except that when the argument 'all' is False, django.contrib.staticfiles.finders.find() will return None instead of an empty list. find() itself always expects the finders to return a list, never None, and so in the end, a result of [None] will get returned to the staticfiles serve() view, instead of just None, and it will try to treat the list as a string, thus throwing an exception. My fix guarantees that an empty list is always returned from CachedFileFinder.find() if the recursive call to find() doesn't find anything.