Code

Catch missing page template errors.
authorstefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 9 Feb 2009 19:18:47 +0000 (19:18 +0000)
committerstefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 9 Feb 2009 19:18:47 +0000 (19:18 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4118 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/cgi/client.py

index a3ea172978451d86b499fc8db772c7a61ad0ea56..d1775daa530d119904a9f50d015272ae3a299959 100644 (file)
@@ -892,7 +892,6 @@ class Client:
         '''
         name = self.classname
         extension = self.template
-        pt = self.instance.templates.get(name, extension)
 
         # catch errors so we can handle PT rendering errors more nicely
         args = {
@@ -900,6 +899,7 @@ class Client:
             'error_message': self.error_message
         }
         try:
+            pt = self.instance.templates.get(name, extension)
             # let the template render figure stuff out
             result = pt.render(self, None, None, **args)
             self.additional_headers['Content-Type'] = pt.content_type