diff --git a/apps/greencheck/importers/importer_cloudflare.py b/apps/greencheck/importers/importer_cloudflare.py index 19e82466..e78de82d 100644 --- a/apps/greencheck/importers/importer_cloudflare.py +++ b/apps/greencheck/importers/importer_cloudflare.py @@ -51,12 +51,13 @@ def parse_to_list(self, raw_data: list[str]) -> List[Union[str, Tuple]]: if not line: continue - # (i.e. ip with subnet + # only return AS networks and IP networks if line.startswith("AS") or line[0].isdigit(): list_of_ips.append(line) return list_of_ips - except Exception: - logger.exception("Something really unexpected happened. Aborting") + except Exception as err: + logger.warning("Unexpected error raised") + logger.warning(err) assert isinstance(CloudflareImporter(), ImporterProtocol)