VirtualMailManager/Handler.py
branchv0.6.x
changeset 272 446483386914
parent 270 d3389645a91d
child 277 e50ffc0b8468
equal deleted inserted replaced
271:e915d4725706 272:446483386914
    19 from subprocess import Popen, PIPE
    19 from subprocess import Popen, PIPE
    20 
    20 
    21 from pyPgSQL import PgSQL  # python-pgsql - http://pypgsql.sourceforge.net
    21 from pyPgSQL import PgSQL  # python-pgsql - http://pypgsql.sourceforge.net
    22 
    22 
    23 import VirtualMailManager.constants.ERROR as ERR
    23 import VirtualMailManager.constants.ERROR as ERR
    24 from VirtualMailManager import ENCODING, set_configuration
    24 from VirtualMailManager import ENCODING
    25 from VirtualMailManager.Account import Account
    25 from VirtualMailManager.Account import Account
    26 from VirtualMailManager.Alias import Alias
    26 from VirtualMailManager.Alias import Alias
    27 from VirtualMailManager.AliasDomain import AliasDomain
    27 from VirtualMailManager.AliasDomain import AliasDomain
    28 from VirtualMailManager.common import exec_ok
    28 from VirtualMailManager.common import exec_ok
    29 from VirtualMailManager.Config import Config as Cfg
    29 from VirtualMailManager.Config import Config as Cfg
    75             self._Cfg.check()
    75             self._Cfg.check()
    76             self._chkenv()
    76             self._chkenv()
    77             # will be moved to the new password module and Alias
    77             # will be moved to the new password module and Alias
    78             #self._scheme = self._Cfg.dget('misc.password_scheme')
    78             #self._scheme = self._Cfg.dget('misc.password_scheme')
    79             #self._postconf = Postconf(self._Cfg.dget('bin.postconf'))
    79             #self._postconf = Postconf(self._Cfg.dget('bin.postconf'))
    80         set_configuration(self._Cfg)
    80         self._Cfg.install()
    81 
    81 
    82     def __findCfgFile(self):
    82     def __findCfgFile(self):
    83         for path in ['/root', '/usr/local/etc', '/etc']:
    83         for path in ['/root', '/usr/local/etc', '/etc']:
    84             tmp = os.path.join(path, 'vmm.cfg')
    84             tmp = os.path.join(path, 'vmm.cfg')
    85             if os.path.isfile(tmp):
    85             if os.path.isfile(tmp):