mirror of
https://github.com/xcat2/confluent.git
synced 2026-09-16 15:27:05 +00:00
Do not let a failed lookup pass for a failed delete
The check for whether the account went sat outside the try, so an error reading it escaped instead of falling back to blanking the account.
This commit is contained in:
@@ -795,11 +795,18 @@ class OEMHandler(object):
|
||||
# that is for
|
||||
break
|
||||
await asyncio.sleep(3)
|
||||
# Uncached: a delete that failed left the account collection in the
|
||||
# url cache as it was before, and answering this from that snapshot
|
||||
# could only ever say the account is still there
|
||||
if not await fishclient._account_url_info_by_id(uid, cache=False):
|
||||
return True
|
||||
try:
|
||||
# Uncached: a delete that failed left the account collection in
|
||||
# the url cache as it was before, and answering this from that
|
||||
# snapshot could only ever say the account is still there
|
||||
if not await fishclient._account_url_info_by_id(uid,
|
||||
cache=False):
|
||||
return True
|
||||
except Exception:
|
||||
# The check did not answer, which says nothing either way about
|
||||
# the delete. Ask again rather than letting the failure to
|
||||
# look escape as though it were the failure to delete.
|
||||
pass
|
||||
try:
|
||||
await fishclient.set_user_password(uid, base64.b64encode(os.urandom(15)))
|
||||
await fishclient.set_user_name(uid, '')
|
||||
|
||||
Reference in New Issue
Block a user