mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a)
This commit is contained in:
parent
fff59155d4
commit
cd171c8e92
83 changed files with 158 additions and 144 deletions
|
@ -388,7 +388,7 @@ def byte_compile (py_files,
|
|||
try:
|
||||
from tempfile import mkstemp
|
||||
(script_fd, script_name) = mkstemp(".py")
|
||||
except ModuleNotFoundError:
|
||||
except ImportError:
|
||||
from tempfile import mktemp
|
||||
(script_fd, script_name) = None, mktemp(".py")
|
||||
log.info("writing byte-compilation script '%s'", script_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue