diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2014-03-27 13:05:41 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-03-27 13:05:41 +0000 |
commit | 691e1811a2c6557c062a76e754a3b5228ce40fbf (patch) | |
tree | 1bb9bb1af62fd9fe02da2a042c50b503e4598c32 | |
parent | 426549369f818091935712936514382786502094 (diff) | |
download | sos-691e1811a2c6557c062a76e754a3b5228ce40fbf.tar.gz |
Pythonify Plugin._path_in_pathlist()
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/__init__.py | 5 |
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 |