VirtualMailManager/Config.py
branchv0.6.x
changeset 280 db35d2eec518
parent 272 446483386914
child 284 ec1966828246
equal deleted inserted replaced
279:74d94b867348 280:db35d2eec518
   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
   392         """Converts the version number (e.g.: 1.2.3) from the *option*'s
   393         value to an int."""
   393         value to an int."""
   394         return version_hex(self.get(section, option))
   394         return version_hex(self.get(section, option))
   395 
   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
       
   402 
       
   403     def known_scheme(self, scheme):
   396     def known_scheme(self, scheme):
   404         """Converts `scheme` to upper case and checks if is known by
   397         """Converts `scheme` to upper case and checks if is known by
   405         Dovecot (listed in VirtualMailManager.SCHEMES).
   398         Dovecot (listed in VirtualMailManager.SCHEMES).
   406 
   399 
   407         Throws a `ConfigValueError` if the scheme is not listed in
   400         Throws a `ConfigValueError` if the scheme is not listed in