Commit f196854e authored by Jason R. Coombs's avatar Jason R. Coombs

Use any for matching exceptions in DirectorySandbox.

--HG--
extra : histedit_source : 9a99f28235a96543a3ca2da4ec691da0e1cd880c
parent 47a46456
......@@ -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"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment