]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
properly test for yaml
authorMark Andrews <marka@isc.org>
Fri, 22 Dec 2017 10:54:18 +0000 (21:54 +1100)
committerMark Andrews <marka@isc.org>
Fri, 22 Dec 2017 10:54:18 +0000 (21:54 +1100)
bin/tests/system/dnstap/tests.sh

index 87bf6d2c65a7767bf0c12f4d46f91f6dfd9acbb4..ca94fa096e4a5395ae4180cda2b6a24d0619455d 100644 (file)
@@ -394,10 +394,10 @@ status=`expr $status + $ret`
 
 HAS_PYYAML=0
 if [ -n "$PYTHON" ] ; then
-       $PYTHON -c "import yaml" && HAS_PYYAML=1
+       $PYTHON -c "import yaml" 2> /dev/null && HAS_PYYAML=1
 fi
 
-if [ $HAS_PYYAML ] ; then
+if [ $HAS_PYYAML -ne 0 ] ; then
        echo "I:checking dnstap-read YAML output"
        ret=0
        $PYTHON ydump.py "$DNSTAPREAD" "ns3/dnstap.out.save" > ydump.out || ret=1