Message120990
Ok, so I understand the issue, but why doesn't the set method simply convert to a string?
>>> from ConfigParser import RawConfigParser
>>> from StringIO import StringIO
>>> parser = RawConfigParser()
>>> config = """
[section]
test = True
"""
>>> parser.readfp(StringIO(config))
>>> parser.get("section", "test")
'True'
>>> parser.getboolean("section", "test")
True
>>> parser.set("section", "test", True)
>>> parser.get("section", "test")
True
>>> parser.getboolean("section", "test")
Traceback (most recent call last):
File "<pyshell#33>", line 1, in <module>
parser.getboolean("section", "test")
File "C:\Python27\lib\ConfigParser.py", line 361, in getboolean
if v.lower() not in self._boolean_states:
AttributeError: 'bool' object has no attribute 'lower' |
|
Date |
User |
Action |
Args |
2010-11-12 00:15:33 | Felix.Laurie.von.Massenbach | set | recipients:
+ Felix.Laurie.von.Massenbach, eric.araujo, lukasz.langa |
2010-11-12 00:15:33 | Felix.Laurie.von.Massenbach | set | messageid: <1289520933.69.0.415283878009.issue10387@psf.upfronthosting.co.za> |
2010-11-12 00:15:32 | Felix.Laurie.von.Massenbach | link | issue10387 messages |
2010-11-12 00:15:32 | Felix.Laurie.von.Massenbach | create | |
|