equal
deleted
inserted
replaced
427 if not isinstance(force, bool): |
427 if not isinstance(force, bool): |
428 raise TypeError('force must be a bool') |
428 raise TypeError('force must be a bool') |
429 self._chk_state() |
429 self._chk_state() |
430 dbc = self._dbh.cursor() |
430 dbc = self._dbh.cursor() |
431 if force: |
431 if force: |
432 dbc.execute('DELETE FROM users WHERE uid = %s', (self._uid),) |
432 dbc.execute('DELETE FROM users WHERE uid = %s', (self._uid,)) |
433 # delete also all aliases where the destination address is the same |
433 # delete also all aliases where the destination address is the same |
434 # as for this account. |
434 # as for this account. |
435 dbc.execute("DELETE FROM alias WHERE destination = %s", |
435 dbc.execute("DELETE FROM alias WHERE destination = %s", |
436 (str(self._addr),)) |
436 (str(self._addr),)) |
437 self._dbh.commit() |
437 self._dbh.commit() |