diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2023-10-20 06:48:20 -0400 |
---|---|---|
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-10-20 17:33:03 +0000 |
commit | 8dd85218541f66b5c6740e46ebb3ebbcfc585af1 (patch) | |
tree | 7b1013f1f5b9c2b428da07566a407d26eec4e9b9 /platform_utils.py | |
parent | 49c9b068382a4a41352bb3429f6d6881e3ce2c21 (diff) | |
download | git-repo-8dd85218541f66b5c6740e46ebb3ebbcfc585af1.tar.gz |
cleanup: leverage yield from in more places
Change-Id: I4f9cb27d89241d3738486764817b51981444a903
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/390274
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Mike Frysinger <vapier@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'platform_utils.py')
-rw-r--r-- | platform_utils.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/platform_utils.py b/platform_utils.py index 2c48e622..d720a07e 100644 --- a/platform_utils.py +++ b/platform_utils.py | |||
@@ -193,10 +193,9 @@ def _walk_windows_impl(top, topdown, onerror, followlinks): | |||
193 | for name in dirs: | 193 | for name in dirs: |
194 | new_path = os.path.join(top, name) | 194 | new_path = os.path.join(top, name) |
195 | if followlinks or not islink(new_path): | 195 | if followlinks or not islink(new_path): |
196 | for x in _walk_windows_impl( | 196 | yield from _walk_windows_impl( |
197 | new_path, topdown, onerror, followlinks | 197 | new_path, topdown, onerror, followlinks |
198 | ): | 198 | ) |
199 | yield x | ||
200 | if not topdown: | 199 | if not topdown: |
201 | yield top, dirs, nondirs | 200 | yield top, dirs, nondirs |
202 | 201 | ||