aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/zipimport.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/zipimport.py')
-rw-r--r--Lib/zipimport.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/Lib/zipimport.py b/Lib/zipimport.py
index 7ceae2b7387..e5192c4d074 100644
--- a/Lib/zipimport.py
+++ b/Lib/zipimport.py
@@ -256,17 +256,9 @@ class zipimporter(_bootstrap_external._LoaderBasics):
def get_resource_reader(self, fullname):
- """Return the ResourceReader for a package in a zip file.
-
- If 'fullname' is a package within the zip file, return the
- 'ResourceReader' object for the package. Otherwise return None.
- """
- try:
- if not self.is_package(fullname):
- return None
- except ZipImportError:
- return None
+ """Return the ResourceReader for a module in a zip file."""
from importlib.readers import ZipReader
+
return ZipReader(self, fullname)