change name of var

This commit is contained in:
Antonio J. Delgado 2021-09-08 15:24:02 +03:00
parent 8d2f6cbb77
commit 388545f613

View file

@ -17,6 +17,7 @@ from logging.handlers import SysLogHandler
import face_recognition import face_recognition
import pyexiv2 import pyexiv2
import PIL import PIL
import cv2
class CustomFormatter(logging.Formatter): class CustomFormatter(logging.Formatter):
"""Logging colored formatter, adapted from https://stackoverflow.com/a/56944256/3638629""" """Logging colored formatter, adapted from https://stackoverflow.com/a/56944256/3638629"""
@ -176,7 +177,7 @@ class image_classifier:
def is_image(self, file): def is_image(self, file):
try: try:
im = PIL.Image.open(file) image_object = PIL.Image.open(file)
except PIL.UnidentifiedImageError as error: except PIL.UnidentifiedImageError as error:
self._log.debug(f"File '{file}' is not an image recognizable by PIL. {error}") self._log.debug(f"File '{file}' is not an image recognizable by PIL. {error}")
return False return False