aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/sandbox.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2013-12-07 12:14:52 -0500
committerJason R. Coombs <jaraco@jaraco.com>2013-12-07 12:14:52 -0500
commitf196854eeb75ecd5b3e676e29b0f29137af25826 (patch)
tree27b895b9c9b0b0c0f37038f71b61703b84b02d3d /setuptools/sandbox.py
parent47a464565e66612086c02d35c470ad20909e3931 (diff)
downloadexternal_python_setuptools-f196854eeb75ecd5b3e676e29b0f29137af25826.tar.gz
external_python_setuptools-f196854eeb75ecd5b3e676e29b0f29137af25826.tar.bz2
external_python_setuptools-f196854eeb75ecd5b3e676e29b0f29137af25826.zip
Use any for matching exceptions in DirectorySandbox.
--HG-- extra : histedit_source : 9a99f28235a96543a3ca2da4ec691da0e1cd880c
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 49c4ea93..d50f1f66 100755
--- a/setuptools/sandbox.py
+++ b/setuptools/sandbox.py
@@ -237,8 +237,11 @@ class DirectorySandbox(AbstractSandbox):
self._active = active
def _exempted(self, filepath):
- exception_matches = map(filepath.startswith, self._exceptions)
- return True in exception_matches
+ exception_matches = any(
+ filepath.startswith(exception)
+ for exception in self._exceptions
+ )
+ return exception_matches
def _remap_input(self, operation, path, *args, **kw):
"""Called for path inputs"""