summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/ConfigParser.py2
-rw-r--r--Lib/test/test_file.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/ConfigParser.py b/Lib/ConfigParser.py
index 9a365c0..8e644e1 100644
--- a/Lib/ConfigParser.py
+++ b/Lib/ConfigParser.py
@@ -569,7 +569,7 @@ class ConfigParser(RawConfigParser):
value = value % vars
except KeyError as e:
raise InterpolationMissingOptionError(
- option, section, rawval, e.message)
+ option, section, rawval, e.args[0])
else:
break
if "%(" in value:
diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py
index a57ab43..c4bd610 100644
--- a/Lib/test/test_file.py
+++ b/Lib/test/test_file.py
@@ -156,7 +156,7 @@ class OtherFileTests(unittest.TestCase):
try:
f = open(TESTFN, bad_mode)
except ValueError as msg:
- if msg.message != 0:
+ if msg.args[0] != 0:
s = str(msg)
if s.find(TESTFN) != -1 or s.find(bad_mode) == -1:
self.fail("bad error message for invalid mode: %s" % s)