We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f024c5 commit 8a76d18Copy full SHA for 8a76d18
Lib/zipimport.py
@@ -62,6 +62,8 @@ class zipimporter(_bootstrap_external._LoaderBasics):
62
# entry in sys.path_importer_cache, fetch the file directory from there
63
# if found, or else read it from the archive.
64
def __init__(self, path):
65
+ if not isinstance(path, str):
66
+ raise TypeError(f"expected str, not {type(path)!r}")
67
if not path:
68
raise ZipImportError('archive path is empty', path=path)
69
if alt_path_sep:
0 commit comments