VirtualMailManager/Config.py
branchv0.6.x
changeset 272 446483386914
parent 270 d3389645a91d
child 280 db35d2eec518
equal deleted inserted replaced
271:e915d4725706 272:446483386914
   387                     errmsg.write((u'    %s\n') % option)
   387                     errmsg.write((u'    %s\n') % option)
   388             raise ConfigError(errmsg.getvalue(), CONF_ERROR)
   388             raise ConfigError(errmsg.getvalue(), CONF_ERROR)
   389         check_version_format(self.get('misc', 'dovecot_version'))
   389         check_version_format(self.get('misc', 'dovecot_version'))
   390 
   390 
   391     def hexversion(self, section, option):
   391     def hexversion(self, section, option):
       
   392         """Converts the version number (e.g.: 1.2.3) from the *option*'s
       
   393         value to an int."""
   392         return version_hex(self.get(section, option))
   394         return version_hex(self.get(section, option))
       
   395 
       
   396     def install(self):
       
   397         """Installs the dget() method as ``cfg_dget`` in the built-in
       
   398         namespace."""
       
   399         import __builtin__
       
   400         assert 'cfg_dget' not in __builtin__.__dict__
       
   401         __builtin__.__dict__['cfg_dget'] = self.dget
   393 
   402 
   394     def known_scheme(self, scheme):
   403     def known_scheme(self, scheme):
   395         """Converts `scheme` to upper case and checks if is known by
   404         """Converts `scheme` to upper case and checks if is known by
   396         Dovecot (listed in VirtualMailManager.SCHEMES).
   405         Dovecot (listed in VirtualMailManager.SCHEMES).
   397 
   406