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.")