~khurshid-alam/geary/geary-0.11

« back to all changes in this revision

Viewing changes to src/client/application/secret-mediator.vala

  • Committer: Michael Gratton
  • Author(s): Gautier Pelloux-Prayer
  • Date: 2017-02-07 11:03:35 UTC
  • Revision ID: git-v1:5da03880da47b316aa4256a89981f34e328bcd9f
Don't abort the application if password could not be saved in the secrets manager. Bug 776139

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
        Cancellable? cancellable = null) throws Error {
84
84
        string key_name = get_key_name(service, account_information.email);
85
85
        Geary.Credentials credentials = get_credentials(service, account_information);
86
 
        
87
 
        bool result = yield Secret.password_store(Secret.SCHEMA_COMPAT_NETWORK,
88
 
            null, key_name, credentials.pass, cancellable, "user", key_name);
89
 
        if (!result)
90
 
            debug("Unable to store password for \"%s\" in libsecret keyring", key_name);
 
86
        try {
 
87
            yield Secret.password_store(Secret.SCHEMA_COMPAT_NETWORK,
 
88
                null, key_name, credentials.pass, cancellable, "user", key_name);
 
89
        } catch (Error e) {
 
90
            debug("Unable to store password for \"%s\" in libsecret keyring: %s", key_name, e.message);
 
91
        }
91
92
    }
 
93
 
92
94
    
93
95
    public virtual async void clear_password_async(
94
96
        Geary.Service service, Geary.AccountInformation account_information, Cancellable? cancellable = null)