diff --git a/mercurial_keyring.py b/mercurial_keyring.py --- a/mercurial_keyring.py +++ b/mercurial_keyring.py @@ -388,7 +388,11 @@ class HTTPPasswordHandler(object): # Otherwise we won't be able to find the password so it # does not make much sense to preserve it _debug(ui, _("Saving password for %s to keyring") % user) - password_store.set_http_password(final_url, user, pwd) + try: + password_store.set_http_password(final_url, user, pwd) + except keyring.errors.PasswordSetError, e: + ui.traceback() + ui.warn(_("warning: failed to save password in keyring\n")) # Saving password to the memory cache self.pwd_cache.store(realm, final_url, user, pwd)