From 11ac1202acb2fa0e2cfa21c7b6fbbed6ade199ed Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Mon, 6 Sep 2021 17:20:06 +0300 Subject: [PATCH] Change to only modify and no add --- image_classifier/image_classifier.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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: