# HG changeset patch # User Pascal Volk # Date 1295481486 0 # Node ID ecdba68c7a2c8a855b0dbd982f2cbae1f09891f5 # Parent 1016a17684c1dbdf7d5756a43cb1bee798df3736 VMM/account: Account._count_aliases() cast the EmailAddress to str, in order to avoid errors from the database. diff -r 1016a17684c1 -r ecdba68c7a2c 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