Commit b89c7c87 authored by Jim Fulton's avatar Jim Fulton

Fixed bug arising from a change in exception semantics in Python 1.5.2

that caused optional not to work.
parent 11b24f33
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
'and' or 'or' tag, otherwise, no text is inserted. 'and' or 'or' tag, otherwise, no text is inserted.
''' '''
__rcs_id__='$Id: sqltest.py,v 1.9 1999/03/10 00:15:44 klm Exp $' __rcs_id__='$Id: sqltest.py,v 1.10 1999/08/26 17:59:36 jim Exp $'
############################################################################ ############################################################################
# Copyright # Copyright
...@@ -137,7 +137,7 @@ __rcs_id__='$Id: sqltest.py,v 1.9 1999/03/10 00:15:44 klm Exp $' ...@@ -137,7 +137,7 @@ __rcs_id__='$Id: sqltest.py,v 1.9 1999/03/10 00:15:44 klm Exp $'
# rights reserved. # rights reserved.
# #
############################################################################ ############################################################################
__version__='$Revision: 1.9 $'[11:-2] __version__='$Revision: 1.10 $'[11:-2]
import sys import sys
from DocumentTemplate.DT_Util import ParseError, parse_params, name_param from DocumentTemplate.DT_Util import ParseError, parse_params, name_param
...@@ -170,7 +170,7 @@ class SQLTest: ...@@ -170,7 +170,7 @@ class SQLTest:
t=self.type t=self.type
try: v = md[name] try: v = md[name]
except KeyError, key: except KeyError, key:
if key==name and self.optional: return '' if str(key)==name and self.optional: return ''
raise KeyError, key, sys.exc_traceback raise KeyError, key, sys.exc_traceback
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment