VirtualMailManager/Account.py
branchv0.6.x
changeset 236 084331dd1e4c
parent 235 9d3405ed08e5
child 245 f9a6b6701cf9
equal deleted inserted replaced
235:9d3405ed08e5 236:084331dd1e4c
    59         else:
    59         else:
    60             return False
    60             return False
    61 
    61 
    62     def _setAddr(self):
    62     def _setAddr(self):
    63         dom = Domain(self._dbh, self._addr.domainname)
    63         dom = Domain(self._dbh, self._addr.domainname)
    64         self._gid = dom.getID()
    64         self._gid = dom.gid
    65         if self._gid == 0:
    65         if self._gid == 0:
    66             raise AccE(_(u"The domain ā€œ%sā€ doesn't exist.") %
    66             raise AccE(_(u"The domain ā€œ%sā€ doesn't exist.") %
    67                        self._addr.domainname, ERR.NO_SUCH_DOMAIN)
    67                        self._addr.domainname, ERR.NO_SUCH_DOMAIN)
    68         self._base = dom.getDir()
    68         self._base = dom.directory
    69         self._tid = dom.getTransportID()
    69         self._tid = dom.transport.tid
    70 
    70 
    71     def _setID(self):
    71     def _setID(self):
    72         dbc = self._dbh.cursor()
    72         dbc = self._dbh.cursor()
    73         dbc.execute("SELECT nextval('users_uid')")
    73         dbc.execute("SELECT nextval('users_uid')")
    74         self._uid = dbc.fetchone()[0]
    74         self._uid = dbc.fetchone()[0]