[CMF-checkins] CVS: CMF - FSPythonScript.py:1.8

shane@digicool.com shane@digicool.com
Wed, 2 May 2001 11:48:21 -0400 (EDT)


Update of /cvs-repository/CMF/CMFCore
In directory korak:/tmp/cvs-serv29949

Modified Files:
	FSPythonScript.py 
Log Message:
Works with Zope 2.3 again



--- Updated File FSPythonScript.py in package CMF --
--- FSPythonScript.py	2001/04/30 19:23:48	1.7
+++ FSPythonScript.py	2001/05/02 15:48:19	1.8
@@ -157,9 +157,7 @@
         """
         self._updateFromFS()
         # Prepare the function.
-        f = getattr(self, '_v_f', None)
-        if f is None:
-            f = self._makeFunction(1)
+        f = self._v_f
 
         __traceback_info__ = bound_names, args, kw, self.func_defaults
 
@@ -230,11 +228,13 @@
         ps = PythonScript(self.id)
         ps.write(text)
         ps._makeFunction()
-        self._v_f = ps._v_f
+        ps._editedBindings()
+        self._v_f = f = ps._v_f
         self._body = ps._body
         self._params = ps._params
-        self.func_code = ps.func_code
-    
+        fc = f.func_code
+        self._setFuncSignature(f.func_defaults, fc.co_varnames,
+                               fc.co_argcount)
 
 Globals.InitializeClass(FSPythonScript)