Filtering out lack of phonetype instead of setting it to blank
authorepage <eopage@byu.net>
Sat, 9 Jan 2010 00:26:31 +0000 (00:26 +0000)
committerepage <eopage@byu.net>
Sat, 9 Jan 2010 00:26:31 +0000 (00:26 +0000)
git-svn-id: file:///svnroot/gc-dialer/trunk@614 c39d3808-3fe2-4d86-a59f-b7f623ee9f21

src/backends/gv_backend.py

index df9e3a6..fea3806 100644 (file)
@@ -169,8 +169,9 @@ class GVDialer(object):
                        self._update_contacts_cache()
                contactDetails = self._contacts[contactId]
                return (
-                       (number.get("phoneType", ""), number["phoneNumber"])
+                       (number["phoneType"], number["phoneNumber"])
                        for number in contactDetails["numbers"]
+                       if "phoneType" in number
                )
 
        def get_messages(self):