diff --git a/ci/check-warnings b/ci/check-warnings
index 89ae955d..cdf84aaf 100755
--- a/ci/check-warnings
+++ b/ci/check-warnings
@@ -7,7 +7,7 @@ set -e -u
 
 LOGFILE=$1
 
-LINES=$(grep --invert-match "attempting MIRRORS if available" $LOGFILE | wc -l)
+LINES=$(sed -e "/attempting MIRRORS if available/d" -e "/Error parsing .*netrc:/d" $LOGFILE | wc -l)
 if test "$LINES" -ne 0; then
     echo ==============================
     echo The build had warnings/errors:
