mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Applied suggestions from @iLLiCiTiT
Ensures that any generated thumbnail files that are empty are removed to prevent issues with subsequent processing or storage.
This commit is contained in:
parent
4ed5039732
commit
9791fda4f6
1 changed files with 7 additions and 0 deletions
|
|
@ -569,6 +569,13 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
|
||||||
error)
|
error)
|
||||||
)
|
)
|
||||||
return None
|
return None
|
||||||
|
finally:
|
||||||
|
# Remove output file if is empty
|
||||||
|
if (
|
||||||
|
os.path.exists(output_thumb_file_path)
|
||||||
|
and os.path.getsize(output_thumb_file_path) == 0
|
||||||
|
):
|
||||||
|
os.remove(output_thumb_file_path)
|
||||||
|
|
||||||
def _get_resolution_arg(
|
def _get_resolution_arg(
|
||||||
self,
|
self,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue