diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-08-08 12:56:28 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2017-08-28 16:53:04 -0700 |
commit | 362268d9a506c1d87f197bccef6fed0dcb83d629 (patch) | |
tree | cf0f48c8c93ff908cfbe37aece817af7b716ca81 /alot/account.py | |
parent | 593539bd091dfc53af62180b6a5559487213f953 (diff) |
Use new Address class
This just wries the new Address class into alot for use, and fixes up a
few places where such fixups are needed.
Fixes #1107
Diffstat (limited to 'alot/account.py')
-rw-r--r-- | alot/account.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/alot/account.py b/alot/account.py index 01a536d0..e561f0c9 100644 --- a/alot/account.py +++ b/alot/account.py @@ -201,7 +201,7 @@ class Account(object): signature_filename=None, signature_as_attachment=False, sent_box=None, sent_tags=None, draft_box=None, draft_tags=None, abook=None, sign_by_default=False, - encrypt_by_default=u"none", + encrypt_by_default=u"none", case_sensitive_username=False, **_): sent_tags = sent_tags or [] if 'sent' not in sent_tags: @@ -210,8 +210,9 @@ class Account(object): if 'draft' not in draft_tags: draft_tags.append('draft') - self.address = address - self.aliases = aliases or [] + self.address = Address.from_string(address, case_sensitive=case_sensitive_username) + self.aliases = [Address.from_string(a, case_sensitive=case_sensitive_username) + for a in (aliases or [])] self.alias_regexp = alias_regexp self.realname = realname self.gpg_key = gpg_key |