VMM/alias: Alias._load_dests() use class DestinationEmailAddress v0.6.x
authorPascal Volk <neverseen@users.sourceforge.net>
Sat, 03 Sep 2011 19:45:31 +0000
branchv0.6.x
changeset 424 46c296c6e231
parent 423 a43a2e20de71
child 425 8394e222aba3
VMM/alias: Alias._load_dests() use class DestinationEmailAddress for destination addresses, instead of class EmailAddress.
VirtualMailManager/alias.py
--- a/VirtualMailManager/alias.py	Sun Jul 31 22:14:02 2011 +0000
+++ b/VirtualMailManager/alias.py	Sat Sep 03 19:45:31 2011 +0000
@@ -9,7 +9,8 @@
 """
 
 from VirtualMailManager.domain import get_gid
-from VirtualMailManager.emailaddress import EmailAddress
+from VirtualMailManager.emailaddress import \
+     EmailAddress, DestinationEmailAddress as DestAddr
 from VirtualMailManager.errors import AliasError as AErr
 from VirtualMailManager.ext.postconf import Postconf
 from VirtualMailManager.pycompat import all
@@ -44,7 +45,7 @@
                     'address = %s', (self._gid, self._addr.localpart))
         dests = dbc.fetchall()
         if dbc.rowcount > 0:
-            self._dests.extend(EmailAddress(dest[0]) for dest in dests)
+            self._dests.extend(DestAddr(dest[0], self._dbh) for dest in dests)
         dbc.close()
 
     def _check_expansion(self, count_new):