Skip to content

Commit

Permalink
Merge pull request #136 from nextstrain/james/fix-exception-handler
Browse files Browse the repository at this point in the history
[genome colors] fix exception handler
  • Loading branch information
jameshadfield authored Feb 21, 2025
2 parents f34ce9c + beac564 commit 88d3b1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/assign-colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def index_of(search_list, search_value, not_found_value):
print(f"WARNING: For trait {category} we encountered {len(missing)} value(s) not present in the ordering TSV: {missing}", file=stderr)
try:
hexes = schemes[len(observations)]
except IndexError:
except KeyError:
raise Exception(f"Ordering '{category}' had {len(observations)} values but the color-schemes don't go this high!")
for pair in zip(observations, hexes):
tsv_writer.writerow([category, *pair])
Expand Down

0 comments on commit 88d3b1c

Please sign in to comment.