Opened 9 years ago

Closed 9 years ago

#25338 closed New feature (fixed)

IOError exception information gets lost when searching for templates

Reported by: pitr42 Owned by: nobody
Component: Template system Version: 1.8
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In case the IOError is something else than a 'file not found', this information is lost.
https://github.com/django/django/blob/acc3c1df8474f424b2f179bac03d0e9a6bc9aba0/django/template/loaders/filesystem.py#L39

What happens: I tried to load a template from within GAE. Within GAE I wasn't allowed to load the template with its full path name (open() returned a 'permission denied'). The IOError was handled like a 'TemplateDoesNotExist'.

What I expect to happen: I expect the template loader to tell me where it looked for templates and tell me why that specific file could not be opened (wether it be Not Found, Permission Denied, or any other IOError code)

Change History (1)

comment:1 by Tim Graham, 9 years ago

Easy pickings: unset
Resolution: fixed
Status: newclosed
Type: BugNew feature

I believe this is fixed in Django 1.9 with 70123cf084e3af7dfc61bb7bd2090ff802c3cda4.

Note: See TracTickets for help on using tickets.
Back to Top