[Checkins] SVN: z3c.viewtemplate/trunk/ - fixed exception handling if macro is not found in the template
Juergen Kartnaller
juergen at kartnaller.at
Sat Jan 16 04:12:28 EST 2010
Log message for revision 108174:
- fixed exception handling if macro is not found in the template
Changed:
U z3c.viewtemplate/trunk/CHANGES.txt
U z3c.viewtemplate/trunk/src/z3c/viewtemplate/macro.py
-=-
Modified: z3c.viewtemplate/trunk/CHANGES.txt
===================================================================
--- z3c.viewtemplate/trunk/CHANGES.txt 2010-01-16 05:28:14 UTC (rev 108173)
+++ z3c.viewtemplate/trunk/CHANGES.txt 2010-01-16 09:12:27 UTC (rev 108174)
@@ -2,6 +2,8 @@
CHANGES
=======
+ - fixed exception handling if macro is not found in the template
+
0.4.0 (2008-11-05)
------------------
Modified: z3c.viewtemplate/trunk/src/z3c/viewtemplate/macro.py
===================================================================
--- z3c.viewtemplate/trunk/src/z3c/viewtemplate/macro.py 2010-01-16 05:28:14 UTC (rev 108173)
+++ z3c.viewtemplate/trunk/src/z3c/viewtemplate/macro.py 2010-01-16 09:12:27 UTC (rev 108174)
@@ -33,7 +33,7 @@
def __call__(self, *args, **kwargs):
try:
program = self.template.macros[self.macroName]
- except TypeError:
+ except KeyError:
raise KeyError('Macro "%s" not found in file "%s"'% (
self.macroName, self.template.filename))
output = StringIO(u'')
More information about the checkins
mailing list