VirtualMailManager/relocated.py
branchv0.6.x
changeset 379 7518d927d443
parent 366 d6573da35b5f
child 417 8209da83e256
equal deleted inserted replaced
378:af56cee51e67 379:7518d927d443
    80         else:
    80         else:
    81             self._dest = destination
    81             self._dest = destination
    82 
    82 
    83         dbc = self._dbh.cursor()
    83         dbc = self._dbh.cursor()
    84         if not update:
    84         if not update:
    85             dbc.execute('INSERT INTO relocated VALUES (%s, %s, %s)',
    85             dbc.execute('INSERT INTO relocated (gid, address, destination) '
       
    86                         'VALUES (%s, %s, %s)',
    86                         (self._gid, self._addr.localpart, str(self._dest)))
    87                         (self._gid, self._addr.localpart, str(self._dest)))
    87         else:
    88         else:
    88             dbc.execute('UPDATE relocated SET destination = %s WHERE gid = %s '
    89             dbc.execute('UPDATE relocated SET destination = %s WHERE gid = %s '
    89                         'AND address = %s',
    90                         'AND address = %s',
    90                         (str(self._dest), self._gid, self._addr.localpart))
    91                         (str(self._dest), self._gid, self._addr.localpart))