diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-01-19 12:46:30 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-01-19 12:46:30 -0500 |
commit | 3d4d8b9dde61b87271861b8c7ebeb168ac4fa72b (patch) | |
tree | ffbf9cd5a02337ced626892b672b7e21bd305717 /setuptools/sandbox.py | |
parent | a0e8d0568d84e29066a5b45aade5aafe28237ec0 (diff) | |
download | python-setuptools-git-3d4d8b9dde61b87271861b8c7ebeb168ac4fa72b.tar.gz |
👹 Feed the hobgoblins (delint).
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()] ) |