{{{
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/24399>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/24399#comment:1>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/24399#comment:2>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/24399#comment:3>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"70123cf084e3af7dfc61bb7bd2090ff802c3cda4"]:
{{{
#!CommitTicketReference repository=""
revision="70123cf084e3af7dfc61bb7bd2090ff802c3cda4"
Fixed #24399 -- Made filesystem loaders use more specific exceptions.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24399#comment:4>