Skip to content

Commit 6ec0dec

Browse files
authored
[bpo-45765] Fix distribution discovery on empty path. (#29487)
1 parent 912a4cc commit 6ec0dec

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Lib/importlib/metadata/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ def joinpath(self, child):
748748

749749
def children(self):
750750
with suppress(Exception):
751-
return os.listdir(self.root or '')
751+
return os.listdir(self.root or '.')
752752
with suppress(Exception):
753753
return self.zip_children()
754754
return []
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
In importlib.metadata, fix distribution discovery for an empty path.

0 commit comments

Comments
 (0)