summaryrefslogtreecommitdiff
path: root/alot/completion/accounts.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/completion/accounts.py')
-rw-r--r--alot/completion/accounts.py7
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)