From 82f52c241b34ca97c415ef62430c9b963a91d58f Mon Sep 17 00:00:00 2001 From: tech234a <46801700+tech234a@users.noreply.github.com> Date: Wed, 23 Sep 2020 22:59:42 -0400 Subject: [PATCH] Ensure needed commands are installed --- worker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/worker.py b/worker.py index 31d745c..a686a7e 100644 --- a/worker.py +++ b/worker.py @@ -11,7 +11,7 @@ import tracker from youtube_dl import YoutubeDL -from shutil import rmtree +from shutil import rmtree, which from queue import Queue @@ -55,6 +55,8 @@ langs = ['ab', 'aa', 'af', 'sq', 'ase', 'am', 'ar', 'arc', 'hy', 'as', 'ay', 'az 'tt', 'te', 'th', 'bo', 'ti', 'tpi', 'to', 'ts', 'tn', 'tr', 'tk', 'tw', 'uk', 'ur', 'uz', 'vi', 'vo', 'vor', 'cy', 'fy', 'wo', 'xh', 'yi', 'yo', 'zu'] +assert which("zip") and which("rsync") and which("curl"), "Please ensure the zip, rsync, and curl commands are installed on your system." + #HSID, SSID, SID cookies required if "HSID" in environ.keys() and "SSID" in environ.keys() and "SID" in environ.keys(): cookies = {"HSID": environ["HSID"], "SSID": environ["SSID"], "SID": environ["SID"]}