VirtualMailManager/Alias.py
changeset 144 4c6aa6c29dd7
parent 138 617f27715b01
child 146 a08d78344706
equal deleted inserted replaced
143:16542519a5a8 144:4c6aa6c29dd7
    94         dbc.execute('SELECT destination FROM alias WHERE gid=%s AND address=%s',
    94         dbc.execute('SELECT destination FROM alias WHERE gid=%s AND address=%s',
    95                 self._gid, self._addr._localpart)
    95                 self._gid, self._addr._localpart)
    96         destinations = dbc.fetchall()
    96         destinations = dbc.fetchall()
    97         dbc.close()
    97         dbc.close()
    98         if len(destinations) > 0:
    98         if len(destinations) > 0:
    99             targets = []
    99             targets = [destination[0] for destination in destinations]
   100             for destination in destinations:
       
   101                 targets.append(destination[0])
       
   102             return targets
   100             return targets
   103         else:
   101         else:
   104             raise VMMAE(_(u"The alias ā€œ%sā€ doesn't exists.") % self._addr,
   102             raise VMMAE(_(u"The alias ā€œ%sā€ doesn't exists.") % self._addr,
   105                     ERR.NO_SUCH_ALIAS)
   103                     ERR.NO_SUCH_ALIAS)
   106 
   104