Skip to content

Commit

Permalink
Fixing exception type
Browse files Browse the repository at this point in the history
  • Loading branch information
niwilso committed Jul 3, 2023
1 parent 8354d1a commit fb3db90
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ def _check_if_compressed(instance: pydicom.dataset.FileDataset) -> bool:
bits_allocated = instance.BitsAllocated
try:
number_of_frames = instance[0x0028, 0x0008].value
except AttributeError:
except KeyError:
number_of_frames = 1
expected_num_bytes = (rows * columns * number_of_frames
* samples_per_pixel * (bits_allocated/8))
Expand Down

0 comments on commit fb3db90

Please sign in to comment.