Skip to content

Commit

Permalink
Collector #445: Add internal global declaration for Script bindings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Simpson committed Nov 4, 2003
1 parent bbdbe9d commit 8b1af38
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions PythonScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Python code.
"""

__version__='$Revision: 1.49 $'[11:-2]
__version__='$Revision: 1.50 $'[11:-2]

import sys, os, traceback, re, marshal, new
from Globals import DTMLFile, MessageDialog, package_home
Expand Down Expand Up @@ -220,11 +220,13 @@ def __setstate__(self, state):
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])
Expand Down

0 comments on commit 8b1af38

Please sign in to comment.