Commit 916c5be9 authored by Evan Simpson's avatar Evan Simpson

Fix incompatibility with ZClasses

parent 2b6a3a42
...@@ -89,7 +89,7 @@ This product provides support for Script objects containing restricted ...@@ -89,7 +89,7 @@ This product provides support for Script objects containing restricted
Python code. Python code.
""" """
__version__='$Revision: 1.4 $'[11:-2] __version__='$Revision: 1.5 $'[11:-2]
import sys, os, traceback, re import sys, os, traceback, re
from Globals import MessageDialog, HTMLFile, package_home from Globals import MessageDialog, HTMLFile, package_home
...@@ -119,7 +119,7 @@ def manage_addPythonScript(self, id, REQUEST=None): ...@@ -119,7 +119,7 @@ def manage_addPythonScript(self, id, REQUEST=None):
file = REQUEST.form.get('file', None) file = REQUEST.form.get('file', None)
if file: if file:
if type(file) is not type(''): file = file.read() if type(file) is not type(''): file = file.read()
getattr(self, id).write(file) self._getOb(id).write(file)
try: u = self.DestinationURL() try: u = self.DestinationURL()
except: u = REQUEST['URL1'] except: u = REQUEST['URL1']
REQUEST.RESPONSE.redirect('%s/%s/manage_main' % (u, quote(id))) REQUEST.RESPONSE.redirect('%s/%s/manage_main' % (u, quote(id)))
......
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