From 47a9a4bedaa343e72898b2c7534d27f3e0cf4ff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Langa?= Date: Sat, 26 Nov 2016 14:00:39 -0800 Subject: Fixes #24142: [configparser] always join multiline values to not leave the parser in an invalid state --- Lib/configparser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/configparser.py') diff --git a/Lib/configparser.py b/Lib/configparser.py index 3a9fb56dc6..af5aca1fea 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 -- cgit v1.2.1