Mercurial > p > roundup > code
changeset 6700:fadd8d5775a1
Handle case where template file doesn't exist.
If a template file is a dangling symbolic link, it used to raise a
"TypeError: 'NoneType' object is not iterable". Replace that useless
error with a NoTemplate exception reporting the problem file.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Tue, 14 Jun 2022 20:34:16 -0400 |
| parents | 9a1f5e496e6c |
| children | 4a80d677f843 |
| files | roundup/cgi/templating.py |
| diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Tue Jun 07 09:39:35 2022 -0400 +++ b/roundup/cgi/templating.py Tue Jun 14 20:34:16 2022 -0400 @@ -298,6 +298,7 @@ return # will raise invalid template if os.path.exists(src): return (src, f) + raise NoTemplate("Unable to load template: %s"%name) def check(self, name): return bool(self._find(name))
