﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
18983	django.contrib.staticfiles.finders.find can return [None] if a file is not found with a custom finder	Paul Swartz (PCF)	nobody	"If a custom Finder returns None when it can't find a file (when all=True), the find() function wraps it in a list and adds it to the possible return values instead of recognizing it as a not-found file.

It results in this not-too-useful exception:
{{{
Traceback (most recent call last):

  File ""/home/ec2-user/AdmitCloud/virtualenv/lib/python2.6/site-packages/django/core/handlers/base.py"", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File ""/home/ec2-user/AdmitCloud/virtualenv/lib/python2.6/site-packages/django/contrib/staticfiles/views.py"", line 38, in serve
    document_root, path = os.path.split(absolute_path)

  File ""/home/ec2-user/AdmitCloud/virtualenv/lib64/python2.6/posixpath.py"", line 82, in split
    i = p.rfind('/') + 1

AttributeError: 'list' object has no attribute 'rfind'
}}}

If you're writing the custom Finder, the quick fix is to return [] instead of None regardless of the all setting.  I noticed it on 1.3, but it looks like it's still a problem in master. I'll throw a patch up on GitHub shortly."	Bug	closed	contrib.staticfiles	dev	Normal	wontfix			Unreviewed	1	0	0	0	0	0
