From 6a6b3e892580eaeb99b819b03a3a9e0f3aaf253d Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Fri, 29 Apr 2016 16:13:26 +0200 Subject: [PATCH] check ffmpeg binary --- prosopopee/prosopopee.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index 121a1a7..e6f9fd0 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -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")