# HG changeset patch # User cmlenz # Date 1156075730 0 # Node ID 7f96149f28d53516a3d2742d811c9244fd76f21d # Parent a395c11cbced4afa0428aae74b7c2f7422cc936e Raise error when template search path is empty. diff --git a/markup/template.py b/markup/template.py --- a/markup/template.py +++ b/markup/template.py @@ -1115,4 +1115,7 @@ return tmpl except IOError: continue + else: + raise TemplateError('Search path for templates not configured') + raise TemplateNotFound(filename, self.search_path) diff --git a/markup/tests/template.py b/markup/tests/template.py --- a/markup/tests/template.py +++ b/markup/tests/template.py @@ -760,8 +760,7 @@ file2.close() loader = TemplateLoader() - tmpl = loader.load(os.path.abspath(os.path.join(self.dirname, - 'tmpl2.html'))) + tmpl = loader.load(os.path.join(self.dirname, 'tmpl2.html')) self.assertEqual("""
Included
""", tmpl.generate().render())