VirtualMailManager/Config.py
branchv0.6.x
changeset 272 446483386914
parent 270 d3389645a91d
child 280 db35d2eec518
--- a/VirtualMailManager/Config.py	Wed Apr 28 05:37:14 2010 +0000
+++ b/VirtualMailManager/Config.py	Wed Apr 28 09:00:02 2010 +0000
@@ -389,8 +389,17 @@
         check_version_format(self.get('misc', 'dovecot_version'))
 
     def hexversion(self, section, option):
+        """Converts the version number (e.g.: 1.2.3) from the *option*'s
+        value to an int."""
         return version_hex(self.get(section, option))
 
+    def install(self):
+        """Installs the dget() method as ``cfg_dget`` in the built-in
+        namespace."""
+        import __builtin__
+        assert 'cfg_dget' not in __builtin__.__dict__
+        __builtin__.__dict__['cfg_dget'] = self.dget
+
     def known_scheme(self, scheme):
         """Converts `scheme` to upper case and checks if is known by
         Dovecot (listed in VirtualMailManager.SCHEMES).