Commit 7bbd4be7 authored by 's avatar

Added a fix to External Method error handling - it was using

sys.exc_traceback (and getting a nameerror at times). It
really needed to be using sys.exc_info() anyway for thread
reasons.
parent 3155cb61
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
This product provides support for external methods, which allow This product provides support for external methods, which allow
domain-specific customization of web environments. domain-specific customization of web environments.
""" """
__version__='$Revision: 1.33 $'[11:-2] __version__='$Revision: 1.34 $'[11:-2]
from Globals import Persistent, HTMLFile, MessageDialog, HTML from Globals import Persistent, HTMLFile, MessageDialog, HTML
import OFS.SimpleItem, Acquisition import OFS.SimpleItem, Acquisition
from string import split, join, find, lower from string import split, join, find, lower
...@@ -247,7 +247,7 @@ class ExternalMethod(OFS.SimpleItem.Item, Persistent, Acquisition.Explicit, ...@@ -247,7 +247,7 @@ class ExternalMethod(OFS.SimpleItem.Item, Persistent, Acquisition.Explicit,
try: return apply(f,args,kw) try: return apply(f,args,kw)
except TypeError, v: except TypeError, v:
tb=sys.exc_traceback tb=sys.exc_info()[2]
try: try:
if ((self.func_code.co_argcount- if ((self.func_code.co_argcount-
len(self.func_defaults or ()) - 1 == len(args)) len(self.func_defaults or ()) - 1 == len(args))
......
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