_get_lines_from_file() assumes loader.get_source() always exists
|Reported by:||guido@…||Owned by:||nobody|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
PEP 302 says that loaders may *optionally* implement get_source(). It also says that it may return None.
django/views/debug.py line 196 assumes that it always exists and never returns None.
Here's a patch that fixes this.
Change History (6)
Changed 7 years ago by guido@…
comment:1 Changed 7 years ago by guido@…
- Has patch set
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:4 Changed 7 years ago by Simon Greenhill <dev@…>
- Triage Stage changed from Unreviewed to Ready for checkin