move declaration of var

This commit is contained in:
Antonio J. Delgado 2021-09-08 15:36:34 +03:00
parent 2eca1c6c15
commit 5d2a27d186

View file

@ -68,6 +68,7 @@ class image_classifier:
''' Process a file, find faces, add EXIF information and ''' Process a file, find faces, add EXIF information and
move it to the folder of the day''' move it to the folder of the day'''
self._log.debug(f"Looking for faces in file '{file}'...") self._log.debug(f"Looking for faces in file '{file}'...")
new_path = False
if not os.access(file, os.R_OK): if not os.access(file, os.R_OK):
self._log.error(f"The file '{file}' is not readable.") self._log.error(f"The file '{file}' is not readable.")
else: else:
@ -76,7 +77,6 @@ class image_classifier:
self.metadata.read() self.metadata.read()
dirname = os.path.dirname(os.path.realpath(file)) dirname = os.path.dirname(os.path.realpath(file))
filename = os.path.basename(file) filename = os.path.basename(file)
new_path = False
people = self.find_faces(file) people = self.find_faces(file)
if people: if people:
self._log.debug(f"Found {len(people)} known people in the image.") self._log.debug(f"Found {len(people)} known people in the image.")