VirtualMailManager/domain.py
branchv0.6.x
changeset 515 09fa019bb330
parent 510 1fa354bbdb90
child 534 6a27c7529cd7
equal deleted inserted replaced
514:d863a44a6353 515:09fa019bb330
   346     def get_info(self):
   346     def get_info(self):
   347         """Returns a dictionary with information about the domain."""
   347         """Returns a dictionary with information about the domain."""
   348         self._chk_state()
   348         self._chk_state()
   349         dbc = self._dbh.cursor()
   349         dbc = self._dbh.cursor()
   350         dbc.execute('SELECT aliasdomains "alias domains", accounts, aliases, '
   350         dbc.execute('SELECT aliasdomains "alias domains", accounts, aliases, '
   351                     'relocated FROM vmm_domain_info WHERE gid = %s',
   351                     'relocated, catchall "catch-all dests" '
   352                     (self._gid,))
   352                     'FROM vmm_domain_info WHERE gid = %s', (self._gid,))
   353         info = dbc.fetchone()
   353         info = dbc.fetchone()
   354         dbc.close()
   354         dbc.close()
   355         keys = ('alias domains', 'accounts', 'aliases', 'relocated')
   355         keys = ('alias domains', 'accounts', 'aliases', 'relocated',
       
   356                 'catch-all dests')
   356         info = dict(zip(keys, info))
   357         info = dict(zip(keys, info))
   357         info['gid'] = self._gid
   358         info['gid'] = self._gid
   358         info['domain name'] = self._name
   359         info['domain name'] = self._name
   359         info['transport'] = self._transport.transport
   360         info['transport'] = self._transport.transport
   360         info['domain directory'] = self._directory
   361         info['domain directory'] = self._directory