# HG changeset patch # User Pascal Volk # Date 1348776185 0 # Node ID 4ec5c015b7aa77ff8135957957aa1c2f081b45e1 # Parent d8736bb80bdcc9c3e9ee4135f17a017268a9f1d1 VMM/alias: Load destination addresses sorted. This produces sorted output for the aliasinfo subcommand. diff -r d8736bb80bdc -r 4ec5c015b7aa VirtualMailManager/alias.py --- a/VirtualMailManager/alias.py Thu Sep 27 19:15:09 2012 +0000 +++ b/VirtualMailManager/alias.py Thu Sep 27 20:03:05 2012 +0000 @@ -42,7 +42,8 @@ """Loads all known destination addresses into the _dests list.""" dbc = self._dbh.cursor() dbc.execute('SELECT destination FROM alias WHERE gid = %s AND ' - 'address = %s', (self._gid, self._addr.localpart)) + 'address = %s ORDER BY destination', + (self._gid, self._addr.localpart)) dests = dbc.fetchall() if dbc.rowcount > 0: self._dests.extend(DestAddr(dest[0], self._dbh) for dest in dests)