aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2014-03-27 13:05:41 +0000
committerBryn M. Reeves <bmr@redhat.com>2014-03-27 13:05:41 +0000
commit691e1811a2c6557c062a76e754a3b5228ce40fbf (patch)
tree1bb9bb1af62fd9fe02da2a042c50b503e4598c32
parent426549369f818091935712936514382786502094 (diff)
downloadsos-691e1811a2c6557c062a76e754a3b5228ce40fbf.tar.gz
Pythonify Plugin._path_in_pathlist()
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/__init__.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
index 0c4b9b43..55c2d48a 100644
--- a/sos/plugins/__init__.py
+++ b/sos/plugins/__init__.py
@@ -195,10 +195,7 @@ class Plugin(object):
return regex_findall(regex, fname)
def _path_in_path_list(self, path, path_list):
- for p in path_list:
- if p in path:
- return True
- return False
+ return any(p in path for p in path_list)
def copy_symlink(self, srcpath, sub=None):
# the target stored in the original symlink