Skip to content

Commit be7a8d7

Browse files
committed
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.
1 parent 088cf1e commit be7a8d7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

roundup/cgi/templating.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ def _find(self, name):
298298
return # will raise invalid template
299299
if os.path.exists(src):
300300
return (src, f)
301+
raise NoTemplate("Unable to load template: %s"%name)
301302

302303
def check(self, name):
303304
return bool(self._find(name))

0 commit comments

Comments
 (0)