Commit 581f57f1 authored by Jim Fulton's avatar Jim Fulton

Changed to handle non-string returns.

parent bb02363e
......@@ -84,7 +84,7 @@
##############################################################################
"""DTML Document objects."""
__version__='$Revision: 1.26 $'[11:-2]
__version__='$Revision: 1.27 $'[11:-2]
from DocumentTemplate.DT_Util import InstanceDict, TemplateDict
from ZPublisher.Converters import type_converters
from Globals import HTML, HTMLFile, MessageDialog
......@@ -161,7 +161,9 @@ class DTMLDocument(DTMLMethod, PropertyManager):
r=apply(HTML.__call__, (self, bself, REQUEST), kw)
if RESPONSE is None: return r
return decapitate(r, RESPONSE)
try: r=apply(HTML.__call__, (self, (client, bself), REQUEST), kw)
try:
r=apply(HTML.__call__, (self, (client, bself), REQUEST), kw)
if type(r) is not type(''): return r
except:
if self.id()=='standard_error_message':
raise sys.exc_type, sys.exc_value, sys.exc_traceback
......
......@@ -84,7 +84,7 @@
##############################################################################
"""DTML Method objects."""
__version__='$Revision: 1.26 $'[11:-2]
__version__='$Revision: 1.27 $'[11:-2]
from Globals import HTML, HTMLFile, MessageDialog
from string import join,split,strip,rfind,atoi,lower
......@@ -141,11 +141,15 @@ class DTMLMethod(cDocument, HTML, Acquisition.Implicit, RoleManager,
if RESPONSE is None: return r
return decapitate(r, RESPONSE)
try: r=apply(HTML.__call__, (self, client, REQUEST), kw)
try:
r=apply(HTML.__call__, (self, client, REQUEST), kw)
if type(r) is not type(''): return r
except:
if self.id()=='standard_error_message':
raise sys.exc_type, sys.exc_value, sys.exc_traceback
return self.raise_standardErrorMessage(client, REQUEST)
if RESPONSE is None: return r
......
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