diff options
author | Steve Dower <steve.dower@python.org> | 2020-10-19 15:50:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-19 15:50:36 +0100 |
commit | c82f10450c547eb94a04ee17b7c816ff31948297 (patch) | |
tree | ad305c05c5745e1a5e7c136545bec7eefa741e32 /Tools/c-analyzer/c_analyzer/common/files.py | |
parent | eee6bb50c69d94280f43b47390ea9d1b5f42930c (diff) | |
parent | b580ed1d9d55461d8dde027411b90be26cae131e (diff) | |
download | cpython-git-bpo-39107.tar.gz |
Merge branch 'master' into bpo-39107bpo-39107
Diffstat (limited to 'Tools/c-analyzer/c_analyzer/common/files.py')
-rw-r--r-- | Tools/c-analyzer/c_analyzer/common/files.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Tools/c-analyzer/c_analyzer/common/files.py b/Tools/c-analyzer/c_analyzer/common/files.py index f630afe625..a8a044757d 100644 --- a/Tools/c-analyzer/c_analyzer/common/files.py +++ b/Tools/c-analyzer/c_analyzer/common/files.py @@ -60,7 +60,7 @@ def glob_tree(root, *, def iter_files(root, suffix=None, relparent=None, *, - get_files=os.walk, + get_files=None, _glob=glob_tree, _walk=walk_tree, ): @@ -75,6 +75,8 @@ def iter_files(root, suffix=None, relparent=None, *, if "relparent" is provided then it is used to resolve each filename as a relative path. """ + if get_files is None: + get_files = os.walk if not isinstance(root, str): roots = root for root in roots: |