Skip to content

Commit

Permalink
Change the error reporting method
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenglongMa committed Jul 2, 2023
1 parent daddc7f commit 4ccfbf0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/stone/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def process_image(filename, image_type_setting,
skin_tone_palette = specified_palette

tone_labels = specified_tone_labels or default_tone_labels['bw' if to_bw or is_bw else 'color']
assert len(skin_tone_palette) == len(tone_labels), 'argument -p/--palette and -l/--labels must have the same length.'
if len(skin_tone_palette) != len(tone_labels):
raise ValueError('argument -p/--palette and -l/--labels must have the same length.')

try:
records, report_images = process(image, is_bw, to_bw, skin_tone_palette, tone_labels,
Expand Down

0 comments on commit 4ccfbf0

Please sign in to comment.