Re-enabled try/except in cli export
This commit is contained in:
@@ -1776,7 +1776,7 @@ Substitution Description
|
||||
{lf} A line feed: '\n', alias for {newline}
|
||||
{cr} A carriage return: '\r'
|
||||
{crlf} a carriage return + line feed: '\r\n'
|
||||
{osxphotos_version} The osxphotos version, e.g. '0.42.57'
|
||||
{osxphotos_version} The osxphotos version, e.g. '0.42.59'
|
||||
{osxphotos_cmd_line} The full command line used to run osxphotos
|
||||
|
||||
The following substitutions may result in multiple values. Thus if specified for
|
||||
@@ -3601,7 +3601,7 @@ The following template field substitutions are availabe for use the templating s
|
||||
|{lf}|A line feed: '\n', alias for {newline}|
|
||||
|{cr}|A carriage return: '\r'|
|
||||
|{crlf}|a carriage return + line feed: '\r\n'|
|
||||
|{osxphotos_version}|The osxphotos version, e.g. '0.42.57'|
|
||||
|{osxphotos_version}|The osxphotos version, e.g. '0.42.59'|
|
||||
|{osxphotos_cmd_line}|The full command line used to run osxphotos|
|
||||
|{album}|Album(s) photo is contained in|
|
||||
|{folder_album}|Folder path + album photo is contained in. e.g. 'Folder/Subfolder/Album' or just 'Album' if no enclosing folder|
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
""" version info """
|
||||
|
||||
__version__ = "0.42.58"
|
||||
__version__ = "0.42.59"
|
||||
|
||||
@@ -2836,7 +2836,7 @@ def export_photo_with_template(
|
||||
while tries <= retry:
|
||||
tries += 1
|
||||
error = 0
|
||||
# try:
|
||||
try:
|
||||
export_results = photo.export2(
|
||||
dest_path,
|
||||
original_filename=filename,
|
||||
@@ -2901,21 +2901,21 @@ def export_photo_with_template(
|
||||
click.echo(
|
||||
"Retrying export for photo ({photo.uuid}: {photo.original_filename})"
|
||||
)
|
||||
# except Exception as e:
|
||||
# click.echo(
|
||||
# click.style(
|
||||
# f"Error exporting photo ({photo.uuid}: {photo.original_filename}) as {filename}: {e}",
|
||||
# fg=CLI_COLOR_ERROR,
|
||||
# ),
|
||||
# err=True,
|
||||
# )
|
||||
# if tries > retry:
|
||||
# results.error.append((str(pathlib.Path(dest) / filename), e))
|
||||
# break
|
||||
# else:
|
||||
# click.echo(
|
||||
# f"Retrying export for photo ({photo.uuid}: {photo.original_filename})"
|
||||
# )
|
||||
except Exception as e:
|
||||
click.echo(
|
||||
click.style(
|
||||
f"Error exporting photo ({photo.uuid}: {photo.original_filename}) as {filename}: {e}",
|
||||
fg=CLI_COLOR_ERROR,
|
||||
),
|
||||
err=True,
|
||||
)
|
||||
if tries > retry:
|
||||
results.error.append((str(pathlib.Path(dest) / filename), e))
|
||||
break
|
||||
else:
|
||||
click.echo(
|
||||
f"Retrying export for photo ({photo.uuid}: {photo.original_filename})"
|
||||
)
|
||||
|
||||
if verbose:
|
||||
if update:
|
||||
|
||||
Reference in New Issue
Block a user