From 857e3db6ccce810d682cd4632ac9bc8448c4f86b Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Mon, 8 Feb 2021 21:59:20 -0800 Subject: [PATCH] Fixed --exiftool-option, #369, for real this time --- osxphotos/_version.py | 2 +- osxphotos/exiftool.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/osxphotos/_version.py b/osxphotos/_version.py index a9955b73..90e4236a 100644 --- a/osxphotos/_version.py +++ b/osxphotos/_version.py @@ -1,3 +1,3 @@ """ version info """ -__version__ = "0.40.11" +__version__ = "0.40.12" diff --git a/osxphotos/exiftool.py b/osxphotos/exiftool.py index f86eb55d..b076e617 100644 --- a/osxphotos/exiftool.py +++ b/osxphotos/exiftool.py @@ -315,7 +315,13 @@ class ExifTool: if not json_str: return dict() - exifdict = json.loads(json_str) + try: + exifdict = json.loads(json_str) + except Exception as e: + # will fail with some commands, e.g --ext AVI which produces + # 'No file with specified extension' instead of json + return dict() + exifdict = exifdict[0] if not tag_groups: # strip tag groups