diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2019-10-29 20:07:15 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-10-30 09:17:04 +0100 |
commit | 738606e45251b73950a52e62e7186fe4516a018a (patch) | |
tree | 2ea98e9e4fa28a37f73f39986c2419b71296873f /tools/coverity.sh | |
parent | Merge pull request #13747 from ssahani/tc-qdisc (diff) | |
download | systemd-738606e45251b73950a52e62e7186fe4516a018a.tar.xz systemd-738606e45251b73950a52e62e7186fe4516a018a.zip |
coverity: replace python with jq
Judging by https://travis-ci.org/systemd/systemd/jobs/604425785
(where the script failed with "tools/coverity.sh: line 45: python: command not found")
python-unversioned-command is no longer installed by default with python2.
Given that it's not the first time python has vanished and it's not clear
what exactly should be installed to make sure it's there, let's just use jq instead.
Diffstat (limited to 'tools/coverity.sh')
-rwxr-xr-x | tools/coverity.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/coverity.sh b/tools/coverity.sh index e32f5b3993..8edce065ca 100755 --- a/tools/coverity.sh +++ b/tools/coverity.sh @@ -42,11 +42,11 @@ if [ "$AUTH_RES" = "Access denied" ]; then echo -e "\033[33;1mCoverity Scan API access denied. Check COVERITY_SCAN_PROJECT_NAME and COVERITY_SCAN_TOKEN.\033[0m" exit 1 else - AUTH=`echo $AUTH_RES | python -c "import sys, json; print(json.load(sys.stdin)['upload_permitted'])"` - if [ "$AUTH" = "True" ]; then + AUTH=`echo $AUTH_RES | jq .upload_permitted` + if [ "$AUTH" = "true" ]; then echo -e "\033[33;1mCoverity Scan analysis authorized per quota.\033[0m" else - WHEN=`echo $AUTH_RES | python -c "import sys, json; print(json.load(sys.stdin)['next_upload_permitted_at'])"` + WHEN=`echo $AUTH_RES | jq .next_upload_permitted_at` echo -e "\033[33;1mCoverity Scan analysis NOT authorized until $WHEN.\033[0m" exit 1 fi |