[kupfer] evolution: Do not crash if Evolution address book is missing



commit 9f93ac474078c6d9f4db712b7ee0bd576f4aeac6
Author: Luca Falavigna <dktrkranz debian org>
Date:   Wed Mar 2 16:30:25 2011 +0100

    evolution: Do not crash if Evolution address book is missing
    
    Launchpad-bug: https://bugs.launchpad.net/kupfer/+bug/691305

 kupfer/plugin/evolution.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/kupfer/plugin/evolution.py b/kupfer/plugin/evolution.py
index 5f84597..e77486a 100644
--- a/kupfer/plugin/evolution.py
+++ b/kupfer/plugin/evolution.py
@@ -101,6 +101,8 @@ class ContactsSource(AppLeafContentMixin, ToplevelGroupingSource):
 
 	def get_items(self):
 		ebook_ = evolution.ebook.open_addressbook("default")
+		if not ebook_:
+			return
 		for contact in ebook_.get_all_contacts():
 			name = contact.get_property("full-name")
 			email = contact.get_property("email-1")



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]