check ffmpeg binary

This commit is contained in:
Adrien Beudin 2016-04-29 16:13:26 +02:00
parent 0e84865560
commit 6a6b3e8925

View File

@ -161,10 +161,11 @@ class Image(object):
def main():
if os.system("which gm > /dev/null") != 0:
sys.stderr.write("ERROR: I can't locate the 'gm' binary, I won't be able to resize "
"images, please install the 'graphicsmagick' package.\n")
sys.exit(1)
for i in ['gm', 'ffmpeg']:
if os.system("which " + i +" > /dev/null") != 0:
sys.stderr.write("ERROR: I can't locate the "+ i +" binary, I won't be able to resize "
"images, please install the '" + i + "' package.\n")
sys.exit(1)
error(os.path.exists(os.path.join(os.getcwd(), "settings.yaml")), "I can't find a "
"settings.yaml in the current working directory")