VirtualMailManager/catchall.py
branchv0.6.x
changeset 509 1a9247e9763f
parent 507 2aae58cddfa9
child 513 557c4703986c
equal deleted inserted replaced
508:18870919ec48 509:1a9247e9763f
    89         all its destination addresses will be deleted.
    89         all its destination addresses will be deleted.
    90 
    90 
    91         """
    91         """
    92         dbc = self._dbh.cursor()
    92         dbc = self._dbh.cursor()
    93         if not destination:
    93         if not destination:
    94             dbc.execute('DELETE FROM catchall WHERE gid = %s', self._gid)
    94             dbc.execute('DELETE FROM catchall WHERE gid = %s', (self._gid,))
    95         else:
    95         else:
    96             dbc.execute('DELETE FROM catchall WHERE gid = %s '
    96             dbc.execute('DELETE FROM catchall WHERE gid = %s '
    97                         'AND destination = %s', (self._gid, str(destination)))
    97                         'AND destination = %s', (self._gid, str(destination)))
    98         if dbc.rowcount > 0:
    98         if dbc.rowcount > 0:
    99             self._dbh.commit()
    99             self._dbh.commit()