summaryrefslogtreecommitdiffstats
path: root/Lib/decimal.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2013-07-04 21:43:24 (GMT)
committerBrett Cannon <brett@python.org>2013-07-04 21:43:24 (GMT)
commitcd171c8e92c10d327151400fd8f16b11a4964615 (patch)
treedb734100511572201a54a6b7ce1803bcea4c94da /Lib/decimal.py
parentfff59155d40ede93594eb77f320e0bde658cce28 (diff)
downloadcpython-cd171c8e92c10d327151400fd8f16b11a4964615.zip
cpython-cd171c8e92c10d327151400fd8f16b11a4964615.tar.gz
cpython-cd171c8e92c10d327151400fd8f16b11a4964615.tar.bz2
Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a)
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r--Lib/decimal.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py
index 6c3e19e..d39ac1d 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 ModuleNotFoundError:
+except ImportError:
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 ModuleNotFoundError:
+except ImportError:
# 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 ModuleNotFoundError:
+except ImportError:
pass
def _parse_format_specifier(format_spec, _localeconv=None):
@@ -6391,7 +6391,7 @@ del sys
try:
import _decimal
-except ModuleNotFoundError:
+except ImportError:
pass
else:
s1 = set(dir())