password: do not abort on trying to remove a user without password account

This commit is contained in:
Frédéric Péters 2013-01-21 09:19:40 +01:00
parent b8fca01771
commit 3caa9927f4
1 changed files with 4 additions and 1 deletions

View File

@ -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()