Message310175
def write(self, fp):
"""Write an .ini-format representation of the configuration state."""
if self._defaults:
fp.write("[%s]\n" % DEFAULTSECT)
for (key, value) in self._defaults.items():
fp.write("%s = %s\n" % (key, str(value).replace('\n', '\n\t')))
fp.write("\n")
for section in self._sections:
fp.write("[%s]\n" % section)
for (key, value) in self._sections[section].items():
if key == "__name__":
continue
if (value is not None) or (self._optcre == self.OPTCRE):
if value == "": #
value = "\"\"" #
key = " = ".join((key, str(value).replace('\n', '\n\t')))#
else: #
key = " = ".join((key, str(value).replace('\n', '\n\t')))
# key = " = ".join((key, str(value).replace('\n', '\n\t')))
fp.write("%s\n" % (key))
fp.write("\n") |
|
Date |
User |
Action |
Args |
2018-01-17 14:26:47 | jiangjinhu666 | set | recipients:
+ jiangjinhu666, r.david.murray |
2018-01-17 14:26:47 | jiangjinhu666 | set | messageid: <1516199207.36.0.467229070634.issue32581@psf.upfronthosting.co.za> |
2018-01-17 14:26:47 | jiangjinhu666 | link | issue32581 messages |
2018-01-17 14:26:47 | jiangjinhu666 | create | |
|