equal
deleted
inserted
replaced
219 dbc.execute("DELETE FROM users WHERE gid=%s AND local_part=%s", |
219 dbc.execute("DELETE FROM users WHERE gid=%s AND local_part=%s", |
220 self._gid, self._addr._localpart) |
220 self._gid, self._addr._localpart) |
221 u_rc = dbc.rowcount |
221 u_rc = dbc.rowcount |
222 # delete also all aliases where the destination address is the same |
222 # delete also all aliases where the destination address is the same |
223 # as for this account. |
223 # as for this account. |
224 dbc.execute("DELETE FROM alias WHERE destination = %s", self._addr) |
224 dbc.execute("DELETE FROM alias WHERE destination = %s", |
|
225 str(self._addr)) |
225 if u_rc > 0 or dbc.rowcount > 0: |
226 if u_rc > 0 or dbc.rowcount > 0: |
226 self._dbh.commit() |
227 self._dbh.commit() |
227 else: # check first for aliases |
228 else: # check first for aliases |
228 a_count = self.__aliaseCount() |
229 a_count = self.__aliaseCount() |
229 if a_count == 0: |
230 if a_count == 0: |