Move debug

This commit is contained in:
Antonio J. Delgado 2021-09-08 14:32:45 +03:00
parent 566705be88
commit 9bfb54e1b1

View file

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