mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
fix output from RawConfigParser.write and ConfigParser.write for None
values (http://bugs.python.org/issue7005) (merged r84443 from the release27-mmaint branch, with changes to reflect changes in Python 3)
This commit is contained in:
parent
af1e140334
commit
8844441ae6
3 changed files with 33 additions and 1 deletions
|
@ -637,7 +637,7 @@ class RawConfigParser:
|
|||
for key, value in section_items:
|
||||
if key == "__name__":
|
||||
continue
|
||||
if value is not None:
|
||||
if (value is not None) or (self._optcre == self.OPTCRE):
|
||||
value = delimiter + str(value).replace('\n', '\n\t')
|
||||
else:
|
||||
value = ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue