summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2012-04-06 08:14:19 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2012-04-06 08:14:19 +0100
commit2f669d0dd620c5c3066afacbc32c8b01650bbfba (patch)
treeef65984fed977495f9f97852eb1c9f226c7674bd
parentb83bd7c9405ba23d9dabac87856e654ec9531997 (diff)
parentd70e88266c76d485f068c36aa6072392e599838c (diff)
Merge branch '0.3-fix-abook-emails-424' into staging
-rw-r--r--alot/addressbooks.py7
-rw-r--r--alot/defaults/abook_contacts.spec2
2 files changed, 6 insertions, 3 deletions
diff --git a/alot/addressbooks.py b/alot/addressbooks.py
index d3d6936c..f527492f 100644
--- a/alot/addressbooks.py
+++ b/alot/addressbooks.py
@@ -44,8 +44,11 @@ class AbookAddressBook(AddressBook):
def get_contacts(self):
c = self._config
- return [(c[id]['name'], c[id]['email']) for id in c.sections if \
- c[id]['email'] is not None]
+ res = []
+ for id in c.sections:
+ for email in c[id]['email']:
+ if email: res.append((c[id]['name'], email))
+ return res
class MatchSdtoutAddressbook(AddressBook):
diff --git a/alot/defaults/abook_contacts.spec b/alot/defaults/abook_contacts.spec
index a360c069..bd7922c8 100644
--- a/alot/defaults/abook_contacts.spec
+++ b/alot/defaults/abook_contacts.spec
@@ -4,4 +4,4 @@
[__many__]
name = string(default=None)
- email = string(default=None)
+ email = force_list(default=list())