Fix of no_of_frames (#5819)

If it throws exception, no_of_frames wont be available.
This approach is used to limit need to decide if published file is image or video-like. Hopefully exception is fast enough and would be still necessary for rare cases of weird video-likes files.
This commit is contained in:
Petr Kalis 2023-10-25 17:45:23 +02:00 committed by GitHub
parent 658aa3e30b
commit f35b3508ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -156,8 +156,7 @@ class CollectPublishedFiles(pyblish.api.ContextPlugin):
self.log.debug("frameEnd:: {}".format(
instance.data["frameEnd"]))
except Exception:
self.log.warning("Unable to count frames "
"duration {}".format(no_of_frames))
self.log.warning("Unable to count frames duration.")
instance.data["handleStart"] = asset_doc["data"]["handleStart"]
instance.data["handleEnd"] = asset_doc["data"]["handleEnd"]