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}
|
{lf} A line feed: '\n', alias for {newline}
|
||||||
{cr} A carriage return: '\r'
|
{cr} A carriage return: '\r'
|
||||||
{crlf} a carriage return + line feed: '\r\n'
|
{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
|
{osxphotos_cmd_line} The full command line used to run osxphotos
|
||||||
|
|
||||||
The following substitutions may result in multiple values. Thus if specified for
|
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}|
|
|{lf}|A line feed: '\n', alias for {newline}|
|
||||||
|{cr}|A carriage return: '\r'|
|
|{cr}|A carriage return: '\r'|
|
||||||
|{crlf}|a carriage return + line feed: '\r\n'|
|
|{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|
|
|{osxphotos_cmd_line}|The full command line used to run osxphotos|
|
||||||
|{album}|Album(s) photo is contained in|
|
|{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|
|
|{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 info """
|
||||||
|
|
||||||
__version__ = "0.42.58"
|
__version__ = "0.42.59"
|
||||||
|
|||||||
@@ -2836,7 +2836,7 @@ def export_photo_with_template(
|
|||||||
while tries <= retry:
|
while tries <= retry:
|
||||||
tries += 1
|
tries += 1
|
||||||
error = 0
|
error = 0
|
||||||
# try:
|
try:
|
||||||
export_results = photo.export2(
|
export_results = photo.export2(
|
||||||
dest_path,
|
dest_path,
|
||||||
original_filename=filename,
|
original_filename=filename,
|
||||||
@@ -2901,21 +2901,21 @@ def export_photo_with_template(
|
|||||||
click.echo(
|
click.echo(
|
||||||
"Retrying export for photo ({photo.uuid}: {photo.original_filename})"
|
"Retrying export for photo ({photo.uuid}: {photo.original_filename})"
|
||||||
)
|
)
|
||||||
# except Exception as e:
|
except Exception as e:
|
||||||
# click.echo(
|
click.echo(
|
||||||
# click.style(
|
click.style(
|
||||||
# f"Error exporting photo ({photo.uuid}: {photo.original_filename}) as {filename}: {e}",
|
f"Error exporting photo ({photo.uuid}: {photo.original_filename}) as {filename}: {e}",
|
||||||
# fg=CLI_COLOR_ERROR,
|
fg=CLI_COLOR_ERROR,
|
||||||
# ),
|
),
|
||||||
# err=True,
|
err=True,
|
||||||
# )
|
)
|
||||||
# if tries > retry:
|
if tries > retry:
|
||||||
# results.error.append((str(pathlib.Path(dest) / filename), e))
|
results.error.append((str(pathlib.Path(dest) / filename), e))
|
||||||
# break
|
break
|
||||||
# else:
|
else:
|
||||||
# click.echo(
|
click.echo(
|
||||||
# f"Retrying export for photo ({photo.uuid}: {photo.original_filename})"
|
f"Retrying export for photo ({photo.uuid}: {photo.original_filename})"
|
||||||
# )
|
)
|
||||||
|
|
||||||
if verbose:
|
if verbose:
|
||||||
if update:
|
if update:
|
||||||
|
|||||||
Reference in New Issue
Block a user