diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-05-15 06:13:10 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-05-15 06:13:10 -0400 |
commit | 619e229c9777f0ee0851d8c5c94caaad7d89d434 (patch) | |
tree | 2013eec1df4def402792a3b932d904b714b7e493 /setuptools/sandbox.py | |
parent | b0657c80db7891a9eca038199d5d4c2e2bafed03 (diff) | |
parent | e04c75ab906caadff4609ef34de8973c8e92eff8 (diff) | |
download | external_python_setuptools-619e229c9777f0ee0851d8c5c94caaad7d89d434.tar.gz external_python_setuptools-619e229c9777f0ee0851d8c5c94caaad7d89d434.tar.bz2 external_python_setuptools-619e229c9777f0ee0851d8c5c94caaad7d89d434.zip |
Merge branch 'master' into docs/setup.cfg-only
Diffstat (limited to 'setuptools/sandbox.py')
-rw-r--r-- | setuptools/sandbox.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 685f3f72..e46dfc8d 100644 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -13,6 +13,8 @@ from setuptools.extern import six from setuptools.extern.six.moves import builtins, map import pkg_resources.py31compat +from distutils.errors import DistutilsError +from pkg_resources import working_set if sys.platform.startswith('java'): import org.python.modules.posix.PosixModule as _os @@ -23,8 +25,6 @@ try: except NameError: _file = None _open = open -from distutils.errors import DistutilsError -from pkg_resources import working_set __all__ = [ @@ -374,7 +374,7 @@ class AbstractSandbox: if hasattr(os, 'devnull'): - _EXCEPTIONS = [os.devnull,] + _EXCEPTIONS = [os.devnull] else: _EXCEPTIONS = [] @@ -466,7 +466,8 @@ class DirectorySandbox(AbstractSandbox): WRITE_FLAGS = functools.reduce( - operator.or_, [getattr(_os, a, 0) for a in + operator.or_, [ + getattr(_os, a, 0) for a in "O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARY".split()] ) |