summaryrefslogtreecommitdiffstats
path: root/Lib/os.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2013-06-14 00:57:26 (GMT)
committerBrett Cannon <brett@python.org>2013-06-14 00:57:26 (GMT)
commit0a140668faf18bf7f8d2ea15e57da5e2a0625292 (patch)
tree97522129bc600a6eff09899ae7a177b5f3e980b3 /Lib/os.py
parent9702a17a6ab90d026449dd20631a6f380d007b3d (diff)
downloadcpython-0a140668faf18bf7f8d2ea15e57da5e2a0625292.zip
cpython-0a140668faf18bf7f8d2ea15e57da5e2a0625292.tar.gz
cpython-0a140668faf18bf7f8d2ea15e57da5e2a0625292.tar.bz2
Issue #18200: Update the stdlib (except tests) to use
ModuleNotFoundError.
Diffstat (limited to 'Lib/os.py')
-rw-r--r--Lib/os.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/os.py b/Lib/os.py
index 96720e4..8f568c7 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -52,13 +52,13 @@ if 'posix' in _names:
try:
from posix import _exit
__all__.append('_exit')
- except ImportError:
+ except ModuleNotFoundError:
pass
import posixpath as path
try:
from posix import _have_functions
- except ImportError:
+ except ModuleNotFoundError:
pass
elif 'nt' in _names:
@@ -68,7 +68,7 @@ elif 'nt' in _names:
try:
from nt import _exit
__all__.append('_exit')
- except ImportError:
+ except ModuleNotFoundError:
pass
import ntpath as path
@@ -78,7 +78,7 @@ elif 'nt' in _names:
try:
from nt import _have_functions
- except ImportError:
+ except ModuleNotFoundError:
pass
elif 'ce' in _names:
@@ -88,7 +88,7 @@ elif 'ce' in _names:
try:
from ce import _exit
__all__.append('_exit')
- except ImportError:
+ except ModuleNotFoundError:
pass
# We can use the standard Windows path.
import ntpath as path
@@ -99,11 +99,11 @@ elif 'ce' in _names:
try:
from ce import _have_functions
- except ImportError:
+ except ModuleNotFoundError:
pass
else:
- raise ImportError('no os specific module found')
+ raise ModuleNotFoundError('no os specific module found')
sys.modules['os.path'] = path
from os.path import (curdir, pardir, sep, pathsep, defpath, extsep, altsep,