[Zope-Checkins] CVS: Releases/Zope/lib/python/Products/PythonScripts - PythonScript.py:1.46.2.4

Evan Simpson cvs-admin at zope.org
Tue Nov 4 16:08:53 EST 2003


Update of /cvs-repository/Releases/Zope/lib/python/Products/PythonScripts
In directory cvs.zope.org:/tmp/cvs-serv16108/lib/python/Products/PythonScripts

Modified Files:
      Tag: Zope-2_7-branch
	PythonScript.py 
Log Message:
Collector #445: Add internal global declaration for Script bindings.


=== Releases/Zope/lib/python/Products/PythonScripts/PythonScript.py 1.46.2.3 => 1.46.2.4 ===
--- Releases/Zope/lib/python/Products/PythonScripts/PythonScript.py:1.46.2.3	Tue Nov  4 14:45:37 2003
+++ Releases/Zope/lib/python/Products/PythonScripts/PythonScript.py	Tue Nov  4 16:08:22 2003
@@ -220,11 +220,13 @@
         else:
             self._newfun(marshal.loads(self._code))
 
-    def _compiler(self, *args):
-        return RestrictedPython.compile_restricted_function(*args)
+    def _compiler(self, *args, **kw):
+        return RestrictedPython.compile_restricted_function(*args, **kw)
     def _compile(self):
+        bind_names = self.getBindingAssignments().getAssignedNamesInOrder()
         r = self._compiler(self._params, self._body or 'pass',
-                           self.id, self.meta_type)
+                           self.id, self.meta_type,
+                           globalize=bind_names)
         code = r[0]
         errors = r[1]
         self.warnings = tuple(r[2])




More information about the Zope-Checkins mailing list