diff options
-rw-r--r-- | Lib/importlib/metadata/__init__.py | 2 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Library/2021-11-09-09-04-19.bpo-45765.JVobxK.rst | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py index f5172ee..b3e8fb0 100644 --- a/Lib/importlib/metadata/__init__.py +++ b/Lib/importlib/metadata/__init__.py @@ -748,7 +748,7 @@ class FastPath: 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 [] diff --git a/Misc/NEWS.d/next/Library/2021-11-09-09-04-19.bpo-45765.JVobxK.rst b/Misc/NEWS.d/next/Library/2021-11-09-09-04-19.bpo-45765.JVobxK.rst new file mode 100644 index 0000000..a1f4a1f --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-11-09-09-04-19.bpo-45765.JVobxK.rst @@ -0,0 +1 @@ +In importlib.metadata, fix distribution discovery for an empty path. |