aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--CHANGES.txt6
-rwxr-xr-xsetuptools/sandbox.py6
2 files changed, 9 insertions, 3 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 166eb746..23a198ce 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,12 @@
CHANGES
=======
+-----
+0.9.1
+-----
+
+* Distribute #386: Allow other positional and keyword arguments to os.open.
+
---
0.9
---
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