aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
Diffstat (limited to 'Tools')
-rw-r--r--Tools/c-analyzer/c_analyzer/common/files.py4
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 f630afe6259..a8a044757d0 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: