From 3caa9927f4f2b7b3e3be6130e0549cfdda02c070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 21 Jan 2013 09:19:40 +0100 Subject: [PATCH] password: do not abort on trying to remove a user without password account --- wcs/qommon/ident/password.ptl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wcs/qommon/ident/password.ptl b/wcs/qommon/ident/password.ptl index 66ff4f12b..a06c00ffe 100644 --- a/wcs/qommon/ident/password.ptl +++ b/wcs/qommon/ident/password.ptl @@ -1574,7 +1574,10 @@ def handle_unused_accounts(publisher): account.store() if (time.time() - user.last_seen) > 86400*remove_unused_account_delay: - account = PasswordAccount.get_on_index(user.id, 'user_id') + try: + account = PasswordAccount.get_on_index(user.id, 'user_id') + except KeyError: + continue user.remove_self() account.remove_self()