Mercurial > libervia-backend
diff src/plugins/plugin_misc_smtp.py @ 1031:e90125d07072
plugins misc_account, misc_smtp: update the plugins that deal with passwords
author | souliane <souliane@mailoo.org> |
---|---|
date | Mon, 12 May 2014 17:51:38 +0200 |
parents | 301b342c697a |
children | f91e7028e2c3 |
line wrap: on
line diff
--- a/src/plugins/plugin_misc_smtp.py Wed May 07 16:02:23 2014 +0200 +++ b/src/plugins/plugin_misc_smtp.py Mon May 12 17:51:38 2014 +0200 @@ -180,10 +180,10 @@ profiles = self.host.memory.getProfilesList() if not credentials.username in profiles: return defer.fail(cred_error.UnauthorizedLogin()) - password = self.host.memory.getParamA("Password", "Connection", profile_key=credentials.username) - return defer.maybeDeferred(credentials.checkPassword, - password).addCallback(self._cbPasswordMatch, - credentials.username) + d = self.host.memory.asyncGetParamA("Password", "Connection", profile_key=credentials.username) + d.addCallback(credentials.checkPassword) + d.addCallback(self._cbPasswordMatch, credentials.username) + return d class SmtpServerFactory(smtp.SMTPFactory):