Throw exception is Python is missing

This commit is contained in:
Pierre Rudloff 2016-10-18 10:15:09 +02:00
parent b6f8e585be
commit cb7dad19dc

View file

@ -39,6 +39,8 @@ class VideoDownload
$this->procBuilder = new ProcessBuilder(); $this->procBuilder = new ProcessBuilder();
if (!is_file($this->config->youtubedl)) { if (!is_file($this->config->youtubedl)) {
throw new \Exception("Can't find youtube-dl at ".$this->config->youtubedl); throw new \Exception("Can't find youtube-dl at ".$this->config->youtubedl);
} elseif (!is_file($this->config->python)) {
throw new \Exception("Can't find Python at ".$this->config->python);
} }
$this->procBuilder->setPrefix( $this->procBuilder->setPrefix(
array_merge( array_merge(