diff options
author | Brett Cannon <brett@python.org> | 2013-06-14 00:57:26 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2013-06-14 00:57:26 (GMT) |
commit | 0a140668faf18bf7f8d2ea15e57da5e2a0625292 (patch) | |
tree | 97522129bc600a6eff09899ae7a177b5f3e980b3 /Lib/decimal.py | |
parent | 9702a17a6ab90d026449dd20631a6f380d007b3d (diff) | |
download | cpython-0a140668faf18bf7f8d2ea15e57da5e2a0625292.zip cpython-0a140668faf18bf7f8d2ea15e57da5e2a0625292.tar.gz cpython-0a140668faf18bf7f8d2ea15e57da5e2a0625292.tar.bz2 |
Issue #18200: Update the stdlib (except tests) to use
ModuleNotFoundError.
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r-- | Lib/decimal.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py index d39ac1d..6c3e19e 100644 --- a/Lib/decimal.py +++ b/Lib/decimal.py @@ -149,7 +149,7 @@ import sys try: from collections import namedtuple as _namedtuple DecimalTuple = _namedtuple('DecimalTuple', 'sign digits exponent') -except ImportError: +except ModuleNotFoundError: DecimalTuple = lambda *args: args # Rounding @@ -430,7 +430,7 @@ _rounding_modes = (ROUND_DOWN, ROUND_HALF_UP, ROUND_HALF_EVEN, ROUND_CEILING, try: import threading -except ImportError: +except ModuleNotFoundError: # Python was compiled without threads; create a mock object instead class MockThreading(object): def local(self, sys=sys): @@ -6147,7 +6147,7 @@ del re # don't care too much if locale isn't present. try: import locale as _locale -except ImportError: +except ModuleNotFoundError: pass def _parse_format_specifier(format_spec, _localeconv=None): @@ -6391,7 +6391,7 @@ del sys try: import _decimal -except ImportError: +except ModuleNotFoundError: pass else: s1 = set(dir()) |