From 9bfb54e1b10a8b207c103b093fb01dcd31a0c43d Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Wed, 8 Sep 2021 14:32:45 +0300 Subject: [PATCH] Move debug --- image_classifier/image_classifier.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/image_classifier/image_classifier.py b/image_classifier/image_classifier.py index 1053b40..bb1b302 100755 --- a/image_classifier/image_classifier.py +++ b/image_classifier/image_classifier.py @@ -57,10 +57,6 @@ class image_classifier: self.directory = directory self.known_people = self.load_known_people() self.no_move = no_move - if no_move: - self._log.debug('Not moving images to subfolders.') - else: - self._log.debug('Moving images to subfolders.') if os.access(directory, os.R_OK): with os.scandir(directory) as directory_item: @@ -109,6 +105,8 @@ class image_classifier: os.makedirs(os.path.dirname(new_path), exist_ok=True) self._log.info(f"Moving file '{file}' to '{new_path}'...") shutil.move(file, new_path) + else: + self._log.debug('Not moving to subfolders.') else: self._log.debug("Doesn't seem to be an image.")