Slightly simplify imgformat retrieval #201
1 changed files with 1 additions and 4 deletions
|
@ -1832,10 +1832,7 @@ def read_images(
|
|||
)
|
||||
else:
|
||||
logger.debug("PIL format = %s", imgdata.format)
|
||||
try:
|
||||
imgformat = ImageFormat[imgdata.format]
|
||||
except KeyError:
|
||||
imgformat = ImageFormat.other
|
||||
imgformat = getattr(ImageFormat, imgdata.format, ImageFormat.other)
|
||||
|
||||
def cleanup():
|
||||
if imgdata is not None:
|
||||
|
|
Loading…
Reference in a new issue