mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Fixes #24142: [configparser] always join multiline values to not leave the parser in an invalid state
This commit is contained in:
parent
c7b1a0bbe2
commit
47a9a4beda
4 changed files with 29 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue