From f196854eeb75ecd5b3e676e29b0f29137af25826 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Dec 2013 12:14:52 -0500 Subject: Use any for matching exceptions in DirectorySandbox. --HG-- extra : histedit_source : 9a99f28235a96543a3ca2da4ec691da0e1cd880c --- setuptools/sandbox.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'setuptools') 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""" -- cgit v1.2.3