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)
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 @@
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 = ""