Skip to content

Commit 1d5413b

Browse files
committed
Fix whats_left_modules under cpython
1 parent 7d08f8f commit 1d5413b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Lib/runpy.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111

1212

1313
import sys
14-
import __importlib_util
14+
try:
15+
import __importlib_util
16+
except:
1517
# FIXME replace above with below once we can import importlib
16-
# import importlib.machinery # importlib first so we can test #15386 via -m
17-
# import importlib.util
18+
import importlib.machinery # importlib first so we can test #15386 via -m
19+
import importlib.util as __importlib_util
1820
import types
1921
# FIXME uncomment line below once we can import pkgutil
2022
# from pkgutil import read_code, get_importer

0 commit comments

Comments
 (0)