equal
deleted
inserted
replaced
40 |
40 |
41 def _load_dests(self): |
41 def _load_dests(self): |
42 """Loads all known destination addresses into the _dests list.""" |
42 """Loads all known destination addresses into the _dests list.""" |
43 dbc = self._dbh.cursor() |
43 dbc = self._dbh.cursor() |
44 dbc.execute('SELECT destination FROM alias WHERE gid = %s AND ' |
44 dbc.execute('SELECT destination FROM alias WHERE gid = %s AND ' |
45 'address = %s', (self._gid, self._addr.localpart)) |
45 'address = %s ORDER BY destination', |
|
46 (self._gid, self._addr.localpart)) |
46 dests = dbc.fetchall() |
47 dests = dbc.fetchall() |
47 if dbc.rowcount > 0: |
48 if dbc.rowcount > 0: |
48 self._dests.extend(DestAddr(dest[0], self._dbh) for dest in dests) |
49 self._dests.extend(DestAddr(dest[0], self._dbh) for dest in dests) |
49 dbc.close() |
50 dbc.close() |
50 |
51 |