summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/distutils/util.py')
-rw-r--r--Lib/distutils/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index a2f9544..e241f59 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -388,7 +388,7 @@ def byte_compile (py_files,
try:
from tempfile import mkstemp
(script_fd, script_name) = mkstemp(".py")
- except ImportError:
+ except ModuleNotFoundError:
from tempfile import mktemp
(script_fd, script_name) = None, mktemp(".py")
log.info("writing byte-compilation script '%s'", script_name)