From c22802fc6a7cdd5643d55a89f38b95d149fd2650 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Thu, 8 Jun 2017 16:09:24 +0200 Subject: Correct membership test --- alot/addressbook/external.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'alot/addressbook') diff --git a/alot/addressbook/external.py b/alot/addressbook/external.py index 6a89dd15..9de86f36 100644 --- a/alot/addressbook/external.py +++ b/alot/addressbook/external.py @@ -68,7 +68,7 @@ class ExternalAddressbook(AddressBook): m = re.match(self.regex, l, self.reflags) if m: info = m.groupdict() - if 'email' and 'name' in info: + if 'email' in info and 'name' in info: email = info['email'].strip() name = info['name'] res.append((name, email)) -- cgit v1.2.3