equal
deleted
inserted
replaced
203 |
203 |
204 def getAliases(self): |
204 def getAliases(self): |
205 dbc = self._dbh.cursor() |
205 dbc = self._dbh.cursor() |
206 dbc.execute("SELECT address ||'@'|| domainname FROM alias, domain_name\ |
206 dbc.execute("SELECT address ||'@'|| domainname FROM alias, domain_name\ |
207 WHERE destination = %s AND domain_name.gid = alias.gid\ |
207 WHERE destination = %s AND domain_name.gid = alias.gid\ |
208 AND domain_name.is_primary", str(self._addr)) |
208 AND domain_name.is_primary ORDER BY address", str(self._addr)) |
209 addresses = dbc.fetchall() |
209 addresses = dbc.fetchall() |
210 dbc.close() |
210 dbc.close() |
211 aliases = [] |
211 aliases = [] |
212 if len(addresses) > 0: |
212 if len(addresses) > 0: |
213 aliases = [alias[0] for alias in addresses] |
213 aliases = [alias[0] for alias in addresses] |