Adjust to new version of plum library

This commit is contained in:
Rebecca Breu 2021-07-08 16:32:20 +02:00
parent f896cfb154
commit f0bee26749
2 changed files with 2 additions and 2 deletions

View file

@ -40,7 +40,7 @@ def exif_rotated_image(path=None):
with open(path, 'rb') as f:
try:
exifimg = exif.Image(f)
except plum.UnpackError:
except plum.exceptions.UnpackError:
logger.info(f'Exif parser failed on image: {path}')
return img

View file

@ -24,7 +24,7 @@ def test_exif_rotated_image_not_a_file(qapp):
def test_exif_rotated_image_exif_unpack_error(qapp, imgfilename3x3):
with patch('beeref.fileio.image.exif.Image') as exif_mock:
exif_mock.raise_error = plum.UnpackError()
exif_mock.raise_error = plum.exceptions.UnpackError()
img = exif_rotated_image(imgfilename3x3)
assert img.isNull() is False