aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/sandbox.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2013-07-13 16:14:20 -0400
committerJason R. Coombs <jaraco@jaraco.com>2013-07-13 16:14:20 -0400
commit0be93889e5c04b7573736d312dc4f904c23f6a2e (patch)
tree49a220c664a268e18becb42b9f3edc570a015ab1 /setuptools/sandbox.py
parentfb535e22bf4e09b0f6f8a91d33b9757052dd8ada (diff)
downloadexternal_python_setuptools-0be93889e5c04b7573736d312dc4f904c23f6a2e.tar.gz
external_python_setuptools-0be93889e5c04b7573736d312dc4f904c23f6a2e.tar.bz2
external_python_setuptools-0be93889e5c04b7573736d312dc4f904c23f6a2e.zip
Allow other arguments and kwargs to os.open when in the sandbox. Fixes Distribute #386.
Diffstat (limited to 'setuptools/sandbox.py')
-rwxr-xr-xsetuptools/sandbox.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py
index 4e527446..29fc07b8 100755
--- a/setuptools/sandbox.py
+++ b/setuptools/sandbox.py
@@ -270,11 +270,11 @@ class DirectorySandbox(AbstractSandbox):
self._violation(operation, src, dst, *args, **kw)
return (src,dst)
- def open(self, file, flags, mode=0x1FF): # 0777
+ def open(self, file, flags, mode=0x1FF, *args, **kw): # 0777
"""Called for low-level os.open()"""
if flags & WRITE_FLAGS and not self._ok(file):
- self._violation("os.open", file, flags, mode)
- return _os.open(file,flags,mode)
+ self._violation("os.open", file, flags, mode, *args, **kw)
+ return _os.open(file,flags,mode, *args, **kw)
WRITE_FLAGS = reduce(
operator.or_, [getattr(_os, a, 0) for a in