diff --git a/image_classifier/image_classifier.py b/image_classifier/image_classifier.py index cb19bec..22cd8d6 100755 --- a/image_classifier/image_classifier.py +++ b/image_classifier/image_classifier.py @@ -76,11 +76,11 @@ class image_classifier: if key != 'cannot read a base/unknown IFD tag instance': sys.stdout.write(f"{key}: ") sys.stdout.write(self.exif_info[key]) + self.append_people_to_exif(people) + with open(file, 'wb') as new_image_file: + new_image_file.write(self.exif_info.get_file()) else: self._log.debug("No exif info in the image.") - self.append_people_to_exif(people) - with open(file, 'wb') as new_image_file: - new_image_file.write(self.exif_info.get_file()) # get date # move to destination else: