Add debug info

This commit is contained in:
Antonio J. Delgado 2022-05-02 14:41:25 +03:00
parent 337c55f63f
commit 91ce27b068

View file

@ -114,10 +114,11 @@ class image_classifier:
os.makedirs(new_path) os.makedirs(new_path)
if self.people_folder: if self.people_folder:
for person in people: for person in people:
person_path = os.path.join(self.people_folder, person, folder) person_path = os.path.join(self.people_folder, person.replace(' ', '.'), folder)
if not os.path.exists(person_path): if not os.path.exists(person_path):
os.makedirs(person_path) os.makedirs(person_path)
self._log.info(f"Copying file '{file}' to '{person_path}'...") self._log.info(f"Copying file '{file}' to person '{person}' folder,\
'{person_path}'...")
shutil.copy(file, person_path) shutil.copy(file, person_path)
if not self.no_move: if not self.no_move:
self._log.info(f"Moving file '{file}' to '{new_path}'...") self._log.info(f"Moving file '{file}' to '{new_path}'...")