From 125751630659d68a2c457dd61dfed14944fc632b Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 19 Feb 2013 13:22:49 +0100 Subject: [PATCH] handle the case when user press cancell at gnome keyring password dialog when saving a password. Fixes #7305 --- src/common/passwords.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/passwords.py b/src/common/passwords.py index f36cfd332..ee017d81b 100644 --- a/src/common/passwords.py +++ b/src/common/passwords.py @@ -142,7 +142,8 @@ class GnomePasswordStorage(PasswordStorage): GnomeKeyring.ItemType.NETWORK_PASSWORD, display_name, attributes1, password, update) if err != GnomeKeyring.Result.OK: - if err == GnomeKeyring.Result.DENIED: + if err in (GnomeKeyring.Result.DENIED, + GnomeKeyring.Result.CANCELLED): set_storage(SimplePasswordStorage()) storage.save_password(account_name, password) return