equal
deleted
inserted
replaced
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)) |