From 7764c1958c150cd99c12e47c93264f2aa84c211c Mon Sep 17 00:00:00 2001 From: Nekmo Date: Sat, 31 Mar 2018 01:33:31 +0200 Subject: [PATCH] File must exists --- telegram_upload/video.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram_upload/video.py b/telegram_upload/video.py index b4139918..2b72dadd 100644 --- a/telegram_upload/video.py +++ b/telegram_upload/video.py @@ -32,5 +32,5 @@ def get_video_thumb(file, output=None, width=90): '-vframes', '1', output, ], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) - if not p.returncode: + if not p.returncode and os.path.lexists(file): return output