# HG changeset patch # User Pascal Volk # Date 1266835453 0 # Node ID 0b129678cfe11bd58bc8c22eda5a4c1eb68d2d36 # Parent 3ddb735ec9d246fe586fc02680f3e8818fd526ef VMM/Config: LazyConfig.getboolean(), convert the value in our getboolean. So RawConfigParser hasn't to do the whole get() stuff again. diff -r 3ddb735ec9d2 -r 0b129678cfe1 VirtualMailManager/Config.py --- a/VirtualMailManager/Config.py Mon Feb 22 10:25:48 2010 +0000 +++ b/VirtualMailManager/Config.py Mon Feb 22 10:44:13 2010 +0000 @@ -94,7 +94,9 @@ tmp = self.get(section, option) if isinstance(tmp, bool): return tmp - return RawConfigParser.getboolean(self, section, option) + if not tmp.lower() in self._boolean_states: + raise ValueError, 'Not a boolean: %s' % tmp + return self._boolean_states[tmp.lower()] def _get_section_option(self, section_option): """splits ``section_option`` (section\ **.**\ option) in two parts