VMM/config: s/_boolean_states/BOOLEAN_STATES/g v0.7.x
authorPascal Volk <user@localhost.localdomain.org>
Thu, 22 Nov 2012 18:31:55 +0000
branchv0.7.x
changeset 650 429ba58bc302
parent 649 08837f3fbced
child 651 6937cb38db71
VMM/config: s/_boolean_states/BOOLEAN_STATES/g
VirtualMailManager/config.py
--- a/VirtualMailManager/config.py	Thu Nov 22 12:49:36 2012 +0000
+++ b/VirtualMailManager/config.py	Thu Nov 22 18:31:55 2012 +0000
@@ -84,8 +84,8 @@
         """
         if isinstance(value, bool):
             return value
-        if value.lower() in self._boolean_states:
-            return self._boolean_states[value.lower()]
+        if value.lower() in self.BOOLEAN_STATES:
+            return self.BOOLEAN_STATES[value.lower()]
         else:
             raise ConfigValueError(_("Not a boolean: '%s'") %
                                    get_unicode(value))
@@ -104,9 +104,9 @@
         tmp = self.get(section, option)
         if isinstance(tmp, bool):
             return tmp
-        if not tmp.lower() in self._boolean_states:
+        if not tmp.lower() in self.BOOLEAN_STATES:
             raise ValueError('Not a boolean: %s' % tmp)
-        return self._boolean_states[tmp.lower()]
+        return self.BOOLEAN_STATES[tmp.lower()]
 
     def _get_section_option(self, section_option):
         """splits ``section_option`` (section.option) in two parts and