mirror of
https://github.com/python/cpython.git
synced 2025-08-25 11:15:02 +00:00
Issue #15343: A lot more than just unicode decoding can go wrong when retrieving a source file
This commit is contained in:
parent
8ecf50474c
commit
2824cb507d
3 changed files with 2157 additions and 2129 deletions
|
@ -2048,7 +2048,7 @@ class ModuleScanner:
|
|||
if hasattr(loader, 'get_source'):
|
||||
try:
|
||||
source = loader.get_source(modname)
|
||||
except UnicodeDecodeError:
|
||||
except Exception:
|
||||
if onerror:
|
||||
onerror(modname)
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue