VirtualMailManager/Config.py
branchv0.6.x
changeset 211 0b129678cfe1
parent 209 c705a9e38962
child 215 33f727efa7c4
equal deleted inserted replaced
210:3ddb735ec9d2 211:0b129678cfe1
    92         """
    92         """
    93         # if the setting was modified it may be still a boolean value lets see
    93         # if the setting was modified it may be still a boolean value lets see
    94         tmp = self.get(section, option)
    94         tmp = self.get(section, option)
    95         if isinstance(tmp, bool):
    95         if isinstance(tmp, bool):
    96             return tmp
    96             return tmp
    97         return RawConfigParser.getboolean(self, section, option)
    97         if not tmp.lower() in self._boolean_states:
       
    98             raise ValueError, 'Not a boolean: %s' % tmp
       
    99         return self._boolean_states[tmp.lower()]
    98 
   100 
    99     def _get_section_option(self, section_option):
   101     def _get_section_option(self, section_option):
   100         """splits ``section_option`` (section\ **.**\ option) in two parts
   102         """splits ``section_option`` (section\ **.**\ option) in two parts
   101         and returns them as list ``[section, option]``, if:
   103         and returns them as list ``[section, option]``, if:
   102 
   104