summaryrefslogtreecommitdiffstats
path: root/Lib/configparser.py
diff options
context:
space:
mode:
authorŁukasz Langa <lukasz@langa.pl>2016-11-26 22:00:39 (GMT)
committerŁukasz Langa <lukasz@langa.pl>2016-11-26 22:00:39 (GMT)
commit47a9a4bedaa343e72898b2c7534d27f3e0cf4ff5 (patch)
tree42fb8021459b7a5aa5e207c5625545dc086005eb /Lib/configparser.py
parentc7b1a0bbe2ae298ba0471703ad6d5ef86ae5881d (diff)
downloadcpython-47a9a4bedaa343e72898b2c7534d27f3e0cf4ff5.zip
cpython-47a9a4bedaa343e72898b2c7534d27f3e0cf4ff5.tar.gz
cpython-47a9a4bedaa343e72898b2c7534d27f3e0cf4ff5.tar.bz2
Fixes #24142: [configparser] always join multiline values to not leave the parser in an invalid state
Diffstat (limited to 'Lib/configparser.py')
-rw-r--r--Lib/configparser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/configparser.py b/Lib/configparser.py
index 3a9fb56..af5aca1 100644
--- a/Lib/configparser.py
+++ b/Lib/configparser.py
@@ -1102,10 +1102,10 @@ class RawConfigParser(MutableMapping):
# raised at the end of the file and will contain a
# list of all bogus lines
e = self._handle_error(e, fpname, lineno, line)
+ self._join_multiline_values()
# if any parsing errors occurred, raise an exception
if e:
raise e
- self._join_multiline_values()
def _join_multiline_values(self):
defaults = self.default_section, self._defaults