From 18e1849fcfb1e943dc9ce7f3c66fd1b40c8e9e24 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 20 Sep 2020 18:31:55 -0700 Subject: [PATCH] Fix video_thumbnail not checking if probe failed before using it. --- etiquette/helpers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etiquette/helpers.py b/etiquette/helpers.py index d57541b..e0fd4da 100644 --- a/etiquette/helpers.py +++ b/etiquette/helpers.py @@ -157,7 +157,8 @@ def generate_video_thumbnail(filepath, outfile, width, height, **special): if not os.path.isfile(filepath): raise FileNotFoundError(filepath) probe = constants.ffmpeg.probe(filepath) - if not probe.video: + + if not probe or not probe.video: return False size = imagetools.fit_into_bounds(