def _handle_responses()

in mozetl/taar/taar_amodump.py [0:0]


    def _handle_responses(self, p, addon_map):
        i = 0
        for resp in p.responses():
            try:
                if resp.status_code == 200:
                    jdata = json.loads(resp.content.decode("utf8"))
                    results = jdata["results"]
                    for record in results:
                        if i % 500 == 0:
                            logger.info("Still parsing  addons...")
                        guid = record["guid"]
                        addon_map[guid] = record
                    i += 1
            except Exception as e:
                # Skip this record
                logger.error(e)