mirror of
https://github.com/python/cpython.git
synced 2026-05-17 01:49:12 -04:00
Issue #28005: Allow ImportErrors in encoding implementation to propagate.
This commit is contained in:
@@ -98,8 +98,9 @@ def search_function(encoding):
|
||||
# module with side-effects that is not in the 'encodings' package.
|
||||
mod = __import__('encodings.' + modname, fromlist=_import_tail,
|
||||
level=0)
|
||||
except ImportError:
|
||||
pass
|
||||
except ModuleNotFoundError as ex:
|
||||
if ex.name != 'encodings.' + modname:
|
||||
raise
|
||||
else:
|
||||
break
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user