gh-91298: Refine traversable (apply changes from importlib_resources 5.7.1) (#91623)

* bpo-47142: Refine traversable (apply changes from importlib_resources 5.7.1)

* Replace changelog referencing github issue.
This commit is contained in:
Jason R. Coombs 2022-04-17 11:10:36 -04:00 committed by GitHub
parent 67712e71b3
commit 7659681556
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 16 deletions

View file

@ -42,7 +42,7 @@ def generate(suffix):
def walk(datapath):
for dirpath, dirnames, filenames in os.walk(datapath):
with contextlib.suppress(KeyError):
with contextlib.suppress(ValueError):
dirnames.remove('__pycache__')
for filename in filenames:
res = pathlib.Path(dirpath) / filename