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