From d26ea0dccce138642e7179728502a5fa1ceafefe Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Sun, 22 Mar 2020 09:02:10 -0700 Subject: [PATCH] Fixed unnecessary warning exporting .JPG to .jpeg --- osxphotos/photoinfo.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/osxphotos/photoinfo.py b/osxphotos/photoinfo.py index 1cbca9c3..b755e0e8 100644 --- a/osxphotos/photoinfo.py +++ b/osxphotos/photoinfo.py @@ -618,10 +618,8 @@ class PhotoInfo: # warn if suffixes don't match but ignore .JPG / .jpeg as # Photo's often converts .JPG to .jpeg - if dest.suffix != actual_suffix and sorted([dest.suffix, actual_suffix]) != [ - ".JPG", - ".jpeg", - ]: + suffixes = sorted([x.lower() for x in [dest.suffix, actual_suffix]]) + if dest.suffix != actual_suffix and suffixes != [".jpeg", ".jpg"]: logging.warning( f"Invalid destination suffix: {dest.suffix}, should be {actual_suffix}" )