From 5d2a27d186a5e8387ffbf9903edbd8ccc5d05e0b Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Wed, 8 Sep 2021 15:36:34 +0300 Subject: [PATCH] move declaration of var --- image_classifier/image_classifier.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image_classifier/image_classifier.py b/image_classifier/image_classifier.py index ba81f9e..007ec55 100755 --- a/image_classifier/image_classifier.py +++ b/image_classifier/image_classifier.py @@ -68,6 +68,7 @@ class image_classifier: ''' Process a file, find faces, add EXIF information and move it to the folder of the day''' self._log.debug(f"Looking for faces in file '{file}'...") + new_path = False if not os.access(file, os.R_OK): self._log.error(f"The file '{file}' is not readable.") else: @@ -76,7 +77,6 @@ class image_classifier: self.metadata.read() dirname = os.path.dirname(os.path.realpath(file)) filename = os.path.basename(file) - new_path = False people = self.find_faces(file) if people: self._log.debug(f"Found {len(people)} known people in the image.")