# HG changeset patch # User Pascal Volk # Date 1272585675 0 # Node ID db35d2eec518050a7cd3e1b22583712f043fb138 # Parent 74d94b8673482bf86c5fcc6cec9c874a27d31363 VMM/{Config,Handler}: moved Config.install() to Handler.cfg_install(). Handler.cfg_install() must be called explicitly. To avoid 'strange' problems. diff -r 74d94b867348 -r db35d2eec518 VirtualMailManager/Config.py --- a/VirtualMailManager/Config.py Thu Apr 29 23:03:24 2010 +0000 +++ b/VirtualMailManager/Config.py Fri Apr 30 00:01:15 2010 +0000 @@ -393,13 +393,6 @@ 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). diff -r 74d94b867348 -r db35d2eec518 VirtualMailManager/Handler.py --- 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: