[issue10387] ConfigParser's getboolean method is broken

2010-11-11 Thread Felix Laurie von Massenbach
Felix Laurie von Massenbach added the comment: 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() >&g

[issue10387] ConfigParser's getboolean method is broken

2010-11-11 Thread Felix Laurie von Massenbach
Felix Laurie von Massenbach added the comment: Perhaps I don't understand fully, but I am reading, for example, "option = True" from a config file. When doing this getboolean raises: AttributeError: 'bool' object has no attribute 'lower' Is it intended that

[issue10387] ConfigParser's getboolean method is broken

2010-11-11 Thread Felix Laurie von Massenbach
Felix Laurie von Massenbach added the comment: Oops, that was the broken first version. Let's try again: class MyConfigParser(ConfigParser.RawConfigParser): def getboolean(self, section, option): result = self.get(section, option) try: trues = ["1"

[issue10387] ConfigParser's getboolean method is broken

2010-11-11 Thread Felix Laurie von Massenbach
New submission from Felix Laurie von Massenbach : If the config file has a boolean formatted as either True or False, python raises an attribute error when doing str.lower() on it. In my code I've worked around this in the following way: class MyConfigParser(ConfigParser.RawConfigP