Skip to content

Commit

Permalink
Last code tidy ups
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchrisadams committed Jul 1, 2024
1 parent 8336531 commit 3be2700
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/greencheck/importers/importer_cloudflare.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 3be2700

Please sign in to comment.