Skip to content

Commit

Permalink
- Merge bindings test, python script fix from 2.6 branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver committed Jan 27, 2004
1 parent 3336dbc commit 1fc5a0e
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions PythonScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Python code.
"""

__version__='$Revision: 1.53 $'[11:-2]
__version__='$Revision: 1.54 $'[11:-2]

import sys, os, traceback, re, marshal, new
from Globals import DTMLFile, MessageDialog, package_home
Expand Down Expand Up @@ -315,17 +315,11 @@ def _exec(self, bound_names, args, kw):
PythonScriptTracebackSupplement, self, -1)
f = new.function(fcode, g, None, fadefs)

# Execute the function in a new security context.
security=getSecurityManager()
security.addContext(self)
try:
result = f(*args, **kw)
if keyset is not None:
# Store the result in the cache.
self.ZCacheable_set(result, keywords=keyset)
return result
finally:
security.removeContext(self)
result = f(*args, **kw)
if keyset is not None:
# Store the result in the cache.
self.ZCacheable_set(result, keywords=keyset)
return result

def manage_haveProxy(self,r): return r in self._proxy_roles

Expand Down

0 comments on commit 1fc5a0e

Please sign in to comment.