Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1772 from pypeclub/bugfix/sp_validate_frame_singl…
Browse files Browse the repository at this point in the history
…e_file

Fix - single file files are str only, cast it to list to count properly
  • Loading branch information
kalisp authored Jun 30, 2021
2 parents e5d30c0 + 02def96 commit 46147cb
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ def process(self, instance):
self.log.warning("Cannot check for extension {}".format(ext))
return

frames = len(instance.data.get("representations", [None])[0]["files"])
files = instance.data.get("representations", [None])[0]["files"]
if isinstance(files, str):
files = [files]
frames = len(files)

err_msg = "Frame duration from DB:'{}' ". format(int(duration)) +\
" doesn't match number of files:'{}'".format(frames) +\
Expand Down

0 comments on commit 46147cb

Please sign in to comment.