VirtualMailManager/Alias.py
branchv0.6.x
changeset 223 5c7b7cbb01cd
parent 222 d0c16e70a9fb
child 250 73cd082cd724
equal deleted inserted replaced
222:d0c16e70a9fb 223:5c7b7cbb01cd
    41         dbc.execute(
    41         dbc.execute(
    42                 'SELECT destination FROM alias WHERE gid=%s AND address=%s',
    42                 'SELECT destination FROM alias WHERE gid=%s AND address=%s',
    43                     self._gid, self._addr.localpart)
    43                     self._gid, self._addr.localpart)
    44         dests = iter(dbc.fetchall())
    44         dests = iter(dbc.fetchall())
    45         if dbc.rowcount > 0:
    45         if dbc.rowcount > 0:
    46             dest_add = self._dests.append
    46             self._dests.extend(EmailAddress(dest[0]) for dest in dests)
    47             for dest in dests:
       
    48                 dest_add(EmailAddress(dest[0]))
       
    49         dbc.close()
    47         dbc.close()
    50 
    48 
    51     def __check_expansion(self, count_new, limit):
    49     def __check_expansion(self, count_new, limit):
    52         """Checks the current expansion limit of the alias."""
    50         """Checks the current expansion limit of the alias."""
    53         dcount = len(self._dests)
    51         dcount = len(self._dests)