need to wrap evolution contacts in engine.contact.Contact objects
authorFredrik Wendt <fredrik@wendt.se>
Tue, 8 Jun 2010 22:03:36 +0000 (23:03 +0100)
committerFredrik Wendt <fredrik@wendt.se>
Tue, 8 Jun 2010 22:03:36 +0000 (23:03 +0100)
Signed-off-by: Fredrik Wendt <fredrik@wendt.se>

package/src/org/maemo/hermes/engine/hermes.py

index a3a8a19..732b04d 100644 (file)
@@ -1,4 +1,5 @@
 from org.maemo.hermes.engine.friend import Friend
+from org.maemo.hermes.engine.contact import Contact
 import evolution
 
 class Hermes:
@@ -64,10 +65,10 @@ class Hermes:
     
     # -----------------------------------------------------------------------
     def run_alt(self, overwrite_existing_fields=False):
-        print "+++ Syncing contacts..."
-        self.addresses = evolution.ebook.open_addressbook('default')
-        print "+++ Contact store created..."
-        contacts = self.addresses.get_all_contacts()
+        contacts = []
+        book = evolution.ebook.open_addressbook('default')
+        for contact in book.get_all_contacts():
+            contacts.append(Contact(book, contact))
 
         # warm up
         for service in self._services: