[bpo-45765] Fix distribution discovery on empty path. (#29487)

This commit is contained in:
Jason R. Coombs 2021-11-09 18:49:43 -05:00 committed by GitHub
parent 912a4ccc3a
commit 6ec0dec7b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -748,7 +748,7 @@ def joinpath(self, child):
def children(self):
with suppress(Exception):
return os.listdir(self.root or '')
return os.listdir(self.root or '.')
with suppress(Exception):
return self.zip_children()
return []

View file

@ -0,0 +1 @@
In importlib.metadata, fix distribution discovery for an empty path.