Correct syntax errors v0.6.x
authormartin f. krafft <madduck@madduck.net>
Mon, 09 Apr 2012 23:44:36 +0200
branchv0.6.x
changeset 507 2aae58cddfa9
parent 506 fb0ffde628d6
child 508 18870919ec48
Correct syntax errors
VirtualMailManager/catchall.py
--- a/VirtualMailManager/catchall.py	Mon Apr 09 23:40:52 2012 +0200
+++ b/VirtualMailManager/catchall.py	Mon Apr 09 23:44:36 2012 +0200
@@ -39,7 +39,7 @@
     def __init__(self, dbh, domain):
         self._domain = domain
         self._dbh = dbh
-        self._gid = get_gid(self._dbh, self._addr.domain)
+        self._gid = get_gid(self._dbh, self.domain)
         if not self._gid:
             raise AErr(_(u"The domain '%s' does not exist.") %
                        self._addr.domainname, NO_SUCH_DOMAIN)
@@ -51,7 +51,7 @@
         """Loads all known destination addresses into the _dests list."""
         dbc = self._dbh.cursor()
         dbc.execute('SELECT destination FROM catchall WHERE gid = %s',
-                    self._gid)
+                    (self._gid,))
         dests = dbc.fetchall()
         if dbc.rowcount > 0:
             self._dests.extend(DestAddr(dest[0], self._dbh) for dest in dests)