Skip to content

Commit

Permalink
added type checks to builtin object constructors and edit methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown committed May 16, 2000
1 parent 8b3705e commit b04d8de
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ExternalMethod.py
Expand Up @@ -88,7 +88,7 @@
This product provides support for external methods, which allow
domain-specific customization of web environments.
"""
__version__='$Revision: 1.37 $'[11:-2]
__version__='$Revision: 1.38 $'[11:-2]
from Globals import Persistent, HTMLFile, MessageDialog, HTML
import OFS.SimpleItem, Acquisition
from string import split, join, find, lower
Expand Down Expand Up @@ -122,6 +122,11 @@ def manage_addExternalMethod(self, id, title, module, function, REQUEST=None):
failes, then the file 'Extensions/ACMEWidgets.foo.py' will be
used.
"""
id=str(id)
title=str(title)
module=str(module)
function=str(function)

i=ExternalMethod(id,title,module,function)
self._setObject(id,i)
return self.manage_main(self,REQUEST)
Expand Down Expand Up @@ -184,6 +189,10 @@ def manage_edit(self, title, module, function, REQUEST=None):
the effects of changes, but can lead to problems of functions
rely on shared global data.
"""
title=str(title)
module=str(module)
function=str(function)

self.title=title
if module[-3:]=='.py': module=module[:-3]
elif module[-4:]=='.py': module=module[:-4]
Expand Down

0 comments on commit b04d8de

Please sign in to comment.