Skip to content

Commit 2a317a2

Browse files
committed
Lint
1 parent 0bfd332 commit 2a317a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_imageload/bmp/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ def load(file, *, bitmap=None, palette=None):
5252
width = int.from_bytes(file.read(4), "little")
5353
try:
5454
height = int.from_bytes(file.read(4), "little")
55-
except OverflowError:
55+
except OverflowError as error:
5656
raise NotImplementedError(
5757
"Negative height BMP files are not supported on builds without longint"
58-
)
58+
) from error
5959
file.seek(0x1C) # Number of bits per pixel
6060
color_depth = int.from_bytes(file.read(2), "little")
6161
file.seek(0x1E) # Compression type

0 commit comments

Comments
 (0)