VMM/account: Account._count_aliases() cast the EmailAddress to str, v0.6.x
authorPascal Volk <neverseen@users.sourceforge.net>
Wed, 19 Jan 2011 23:58:06 +0000
branchv0.6.x
changeset 374 ecdba68c7a2c
parent 373 1016a17684c1
child 375 4cbaf8d229f9
VMM/account: Account._count_aliases() cast the EmailAddress to str, in order to avoid errors from the database.
VirtualMailManager/account.py
--- a/VirtualMailManager/account.py	Mon Jan 17 20:19:14 2011 +0000
+++ b/VirtualMailManager/account.py	Wed Jan 19 23:58:06 2011 +0000
@@ -147,7 +147,7 @@
         address of the Account."""
         dbc = self._dbh.cursor()
         dbc.execute('SELECT COUNT(destination) FROM alias WHERE destination '
-                    '= %s', (self._addr,))
+                    '= %s', (str(self._addr),))
         a_count = dbc.fetchone()[0]
         dbc.close()
         return a_count