From ff260dc072e5530b682793550647789b1ef245fa Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Tue, 24 Dec 2019 08:33:54 -0800 Subject: [PATCH] Added check for missing file in export_photo --- osxphotos/__main__.py | 7 +++++++ osxphotos/_version.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/osxphotos/__main__.py b/osxphotos/__main__.py index 5830ea59..9f699625 100644 --- a/osxphotos/__main__.py +++ b/osxphotos/__main__.py @@ -669,6 +669,13 @@ def export_photo( space = " " if not verbose else "" click.echo(f"{space}Skipping missing photos {photo.filename}") return None + elif not os.path.exists(photo.path): + space = " " if not verbose else "" + click.echo( + f"{space}WARNING: file {photo.path} is missing but ismissing=False, " + f"skipping {photo.filename}" + ) + return None filename = None if original_name: diff --git a/osxphotos/_version.py b/osxphotos/_version.py index a596b2ae..99edb428 100644 --- a/osxphotos/_version.py +++ b/osxphotos/_version.py @@ -1,3 +1,3 @@ """ version info """ -__version__ = "0.17.03" +__version__ = "0.17.04"