add checks for the jq command and update README

This commit is contained in:
LecygneNoir 2018-05-08 14:54:25 +02:00
parent 4ec8960451
commit c1e6e032c9
2 changed files with 9 additions and 2 deletions

View file

@ -182,6 +182,12 @@ def publishAt(publishAt, oauth, url, idvideo, secret):
except CalledProcessError:
logging.error("You need to install the curl command line to use the publishAt option.")
exit(1)
try:
FNULL = open(devnull, 'w')
check_call(["jq", "-V"], stdout=FNULL, stderr=STDOUT)
except CalledProcessError:
logging.error("You need to install the jq command line to use the publishAt option.")
exit(1)
time = publishAt.split("T")
# Remove leading seconds that atd does not manage
if time[1].count(":") == 2: