

def _parse_list_data(self, raw_data):
    for entry in raw_data:
        if ('type' not in entry):
            raise BootstrapSourceError((self.ERROR_PREFIX + 'No type defined for entry'))
        entry_type = entry['type']
        if (entry_type == 'host'):
            self._parse_host_entry(entry)
        elif (entry_type == 'cdn'):
            self._parse_cdn_entry(entry)
        else:
            raise BootstrapSourceError((self.ERROR_PREFIX + ("Invalid type: '%s'" % entry_type)))

dataset/ETHPy150Open CacheBrowser/cachebrowser/cachebrowser/bootstrap.py LocalBootstrapSource._parse_list_data/original