VirtualMailManager/Handler.py
branchv0.6.x
changeset 280 db35d2eec518
parent 278 5d229a50b115
child 281 59ff7c719697
--- a/VirtualMailManager/Handler.py	Thu Apr 29 23:03:24 2010 +0000
+++ b/VirtualMailManager/Handler.py	Fri Apr 30 00:01:15 2010 +0000
@@ -74,7 +74,6 @@
             self._chkenv()
             # will be moved to the Alias module
             #self._postconf = Postconf(self._Cfg.dget('bin.postconf'))
-        self._Cfg.install()
 
     def __findCfgFile(self):
         for path in ['/root', '/usr/local/etc', '/etc']:
@@ -345,6 +344,13 @@
         """Get the configured value of the *option* (section.option)."""
         return self._Cfg.pget(option)
 
+    def cfg_install(self):
+        """Installs the cfg_dget method as ``cfg_dget`` into the built-in
+        namespace."""
+        import __builtin__
+        assert 'cfg_dget' not in __builtin__.__dict__
+        __builtin__.__dict__['cfg_dget'] = self._Cfg.dget
+
     def domainAdd(self, domainname, transport=None):
         dom = self.__getDomain(domainname)
         if transport is None: