diff options
author | vrs <none> | 2018-12-08 23:21:20 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2018-12-10 10:25:49 +0000 |
commit | 4180da12e3d4244557484eaa271baf604b0baa4e (patch) | |
tree | f4439d41aaa2a8924a669b43fb5db4ba17a1d0b0 /alot/account.py | |
parent | f7c5b841568886be64695a14f341c4c7c58b3fba (diff) |
rename get_account_by_address to account_matching_address
... since accounts' addresses can overlap and get_account_by_address
promises too much. Also remove now-obsolete get_addresses.
Diffstat (limited to 'alot/account.py')
-rw-r--r-- | alot/account.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/alot/account.py b/alot/account.py index 116c3417..f4a360a4 100644 --- a/alot/account.py +++ b/alot/account.py @@ -250,12 +250,6 @@ class Account(object): u'^' + str(self.alias_regexp) + u'$', flags=0 if case_sensitive_username else re.IGNORECASE) - - def get_addresses(self): - """return all email addresses connected to this account, in order of - their importance""" - return [self.address] + self.aliases - def matches_address(self, address): """returns whether this account knows about an email address @@ -267,9 +261,8 @@ class Account(object): for alias in self.aliases: if alias == address: return True - if self._alias_regexp is not None: - if self._alias_regexp.match(address): - return True + if self._alias_regexp and self._alias_regexp.match(address): + return True return False @staticmethod |