handle the case when user press cancell at gnome keyring password dialog when saving a password. Fixes #7305

This commit is contained in:
Yann Leboulanger 2013-02-19 13:22:49 +01:00
parent 63557c8c05
commit 1257516306
1 changed files with 2 additions and 1 deletions

View File

@ -142,7 +142,8 @@ class GnomePasswordStorage(PasswordStorage):
GnomeKeyring.ItemType.NETWORK_PASSWORD, display_name, attributes1, GnomeKeyring.ItemType.NETWORK_PASSWORD, display_name, attributes1,
password, update) password, update)
if err != GnomeKeyring.Result.OK: if err != GnomeKeyring.Result.OK:
if err == GnomeKeyring.Result.DENIED: if err in (GnomeKeyring.Result.DENIED,
GnomeKeyring.Result.CANCELLED):
set_storage(SimplePasswordStorage()) set_storage(SimplePasswordStorage())
storage.save_password(account_name, password) storage.save_password(account_name, password)
return return