diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2019-08-17 10:03:03 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2019-08-17 11:10:37 +0100 |
commit | fada7a9a40300060dde1b09c93394a790e899795 (patch) | |
tree | 00bc919a14efe0a0f996eb3acc3c44f92f5e2f2f | |
parent | d8d1429ec3daf8f2a67ffccbc2aa1d54eb3639c6 (diff) |
use formataddr helper in accounts completer
-rw-r--r-- | alot/completion/accounts.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/alot/completion/accounts.py b/alot/completion/accounts.py index c83ce09c..20dbcfa6 100644 --- a/alot/completion/accounts.py +++ b/alot/completion/accounts.py @@ -2,10 +2,9 @@ # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file -import email.utils - +from alot.settings.const import settings +from alot.db.utils import formataddr from .stringlist import StringlistCompleter -from ..settings.const import settings class AccountCompleter(StringlistCompleter): @@ -13,7 +12,7 @@ class AccountCompleter(StringlistCompleter): def __init__(self, **kwargs): accounts = settings.get_accounts() - resultlist = [email.utils.formataddr((a.realname, str(a.address))) + resultlist = [formataddr((a.realname, str(a.address))) for a in accounts] StringlistCompleter.__init__(self, resultlist, match_anywhere=True, **kwargs) |