equal
deleted
inserted
replaced
438 if not isinstance(force, bool): |
438 if not isinstance(force, bool): |
439 raise TypeError('force must be a bool') |
439 raise TypeError('force must be a bool') |
440 self._chk_state() |
440 self._chk_state() |
441 dbc = self._dbh.cursor() |
441 dbc = self._dbh.cursor() |
442 if force: |
442 if force: |
443 dbc.execute('DELETE FROM users WHERE uid = %s', (self._uid),) |
443 dbc.execute('DELETE FROM users WHERE uid = %s', (self._uid,)) |
444 # delete also all aliases where the destination address is the same |
444 # delete also all aliases where the destination address is the same |
445 # as for this account. |
445 # as for this account. |
446 dbc.execute("DELETE FROM alias WHERE destination = %s", |
446 dbc.execute("DELETE FROM alias WHERE destination = %s", |
447 (str(self._addr),)) |
447 (str(self._addr),)) |
448 self._dbh.commit() |
448 self._dbh.commit() |