summaryrefslogtreecommitdiffstats
path: root/Lib/configparser.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2010-09-03 04:22:36 (GMT)
committerFred Drake <fdrake@acm.org>2010-09-03 04:22:36 (GMT)
commit8844441ae68358c832e04d8b48ba7b035f67d9bf (patch)
tree464decec5e4b8669c0e76edaaac96d4f36caaaea /Lib/configparser.py
parentaf1e140334e090583651670193d1c310f29bf90e (diff)
downloadcpython-8844441ae68358c832e04d8b48ba7b035f67d9bf.zip
cpython-8844441ae68358c832e04d8b48ba7b035f67d9bf.tar.gz
cpython-8844441ae68358c832e04d8b48ba7b035f67d9bf.tar.bz2
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)
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 eb29b02..fb39ac3 100644
--- a/Lib/configparser.py
+++ b/Lib/configparser.py
@@ -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 = ""