Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ae7b8f07
Commit
ae7b8f07
authored
Jul 08, 2012
by
Amaury Forgeot d'Arc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #15110: Also hide importlib frames when importing a builtin module fails.
parent
9ed37433
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2721 additions
and
2702 deletions
+2721
-2702
Lib/importlib/_bootstrap.py
Lib/importlib/_bootstrap.py
+5
-1
Python/importlib.h
Python/importlib.h
+2716
-2701
No files found.
Lib/importlib/_bootstrap.py
View file @
ae7b8f07
...
...
@@ -490,12 +490,16 @@ class BuiltinImporter:
"""Load a built-in module."""
is_reload
=
fullname
in
sys
.
modules
try
:
return
_imp
.
init_builtin
(
fullname
)
return
cls
.
_exec_module
(
fullname
)
except
:
if
not
is_reload
and
fullname
in
sys
.
modules
:
del
sys
.
modules
[
fullname
]
raise
@
classmethod
def
_exec_module
(
cls
,
fullname
):
return
_imp
.
init_builtin
(
fullname
)
@
classmethod
@
_requires_builtin
def
get_code
(
cls
,
fullname
):
...
...
Python/importlib.h
View file @
ae7b8f07
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment