Skip to content

Commit

Permalink
Merge pull request #174 from dioptra-io/hugo_prefix_not_found_error
Browse files Browse the repository at this point in the history
[diamond_miner]: Prefix not found error
  • Loading branch information
SaiedKazemi authored Jan 11, 2024
2 parents 9be8aee + 2c1632c commit 045414b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions iris/worker/inner_pipeline/diamond_miner.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,14 @@ async def diamond_miner_inner_pipeline(
prefix = f"{addr_v4}/{tool_parameters.prefix_len_v4}"
else:
prefix = f"{addr_v6}/{tool_parameters.prefix_len_v6}"
for protocol, ttls, n_initial_flows in targets[prefix]:
prefixes.append((prefix, protocol, ttls, n_initial_flows))
try:
for protocol, ttls, n_initial_flows in targets[prefix]:
prefixes.append((prefix, protocol, ttls, n_initial_flows))
except KeyError:
logger.error(
f"Prefix not in initial target file {targets_filepath}:{prefix}"
)
continue

logger.info("Insert probe counts")
insert_probe_counts(
Expand Down

0 comments on commit 045414b

Please sign in to comment.