[CMF-checkins] CVS: CMF/CMFCore - FSPageTemplate.py:1.8.8.6
Tres Seaver
tseaver@zope.com
Mon, 23 Sep 2002 11:32:40 -0400
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv29116/CMFCore
Modified Files:
Tag: CMF-1_3-branch
FSPageTemplate.py
Log Message:
- Backport Brian's compilation exception handling fix from head.
=== CMF/CMFCore/FSPageTemplate.py 1.8.8.5 => 1.8.8.6 ===
--- CMF/CMFCore/FSPageTemplate.py:1.8.8.5 Thu Sep 5 16:56:18 2002
+++ CMF/CMFCore/FSPageTemplate.py Mon Sep 23 11:32:39 2002
@@ -17,7 +17,7 @@
from string import split, replace
from os import stat
-import re
+import re, sys
import Globals, Acquisition
from DateTime import DateTime
@@ -141,8 +141,10 @@
except RuntimeError:
if Globals.DevelopmentMode:
err = FSPageTemplate.inheritedAttribute( 'pt_errors' )( self )
+ if not err:
+ err = sys.exc_info()
err_type = err[0]
- err_msg = '<pre>%s</pre>' % replace( err[1], "\'", "'" )
+ err_msg = '<pre>%s</pre>' % replace( str(err[1]), "\'", "'" )
msg = 'FS Page Template %s has errors: %s.<br>%s' % (
self.id, err_type, html_quote(err_msg) )
raise RuntimeError, msg