aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/sandbox.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/sandbox.py')
-rwxr-xr-xsetuptools/sandbox.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py
index b2ae991f..37fc60af 100755
--- a/setuptools/sandbox.py
+++ b/setuptools/sandbox.py
@@ -152,7 +152,10 @@ class AbstractSandbox:
)
-_EXCEPTIONS = [os.devnull,]
+if hasattr(os, 'devnull'):
+ _EXCEPTIONS = [os.devnull,]
+else:
+ _EXCEPTIONS = []
try:
win32com_pkg = os.path.dirname(__import__('win32com').__file__)
@@ -209,7 +212,7 @@ class DirectorySandbox(AbstractSandbox):
def _exempted(self, filepath):
exception_matches = map(filepath.startswith, self._exceptions)
- return any(exception_matches)
+ return True in exception_matches
def _remap_input(self,operation,path,*args,**kw):
"""Called for path inputs"""