﻿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
24399	Filesystem loaders should use more specific exceptions	Preston Timmons	nobody	"The `filesystem` and `app_directories` loaders use the following pattern in `load_template_source`:

{{{
try:
    ...
except IOError:
    pass
}}}

If no templates can be read, `TemplateDoesNotExist` is raised.

This isn't optimal because an `IOError` can be raised for many reasons besides a file not existing, such as permission issues.

I think the file loaders should be updated to only catch the error if the errno is `ENOENT`.

Jinja2 does a similar check, but it includes `EISDIR`. Theoretically, a path could resolve to both a directory and a file. It seems like a weird use case to catch, though.
"	Cleanup/optimization	closed	Template system	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
