Async connect/disconnect. Moved everything to a new Async and Timeout which cleans...
[theonering] / src / gvoice / addressbook.py
index 8efb26f..f5fa02e 100644 (file)
@@ -4,7 +4,7 @@
 import logging
 
 import util.coroutines as coroutines
-import util.misc as util_misc
+import util.misc as misc_utils
 
 
 _moduleLogger = logging.getLogger("gvoice.addressbook")
@@ -60,7 +60,7 @@ class Addressbook(object):
 
        def is_blocked(self, strippedNumber):
                try:
-                       return self._numbers[strippedNumber][1]["response"] == self._RESPONSE_BLOCKED
+                       return self._numbers[strippedNumber][2]["response"] == self._RESPONSE_BLOCKED
                except KeyError:
                        return False
 
@@ -72,7 +72,7 @@ class Addressbook(object):
                        contactName = contactDetails["name"]
                        contactNumbers = (
                                (
-                                       util_misc.normalize_number(numberDetails["phoneNumber"]),
+                                       misc_utils.normalize_number(numberDetails["phoneNumber"]),
                                        numberDetails.get("phoneType", "Mobile"),
                                )
                                for numberDetails in contactDetails["numbers"]