From e893b65a9babba11bf29c0c4a15584e696c6cdd7 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Fri, 22 Apr 2016 08:24:14 -0700 Subject: [PATCH] Don't pick up whole commented lines in the urlopen code-smell tests --- test/code-smell/replace-urlopen.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/code-smell/replace-urlopen.sh b/test/code-smell/replace-urlopen.sh index 428d2319fc..725bcab4d3 100755 --- a/test/code-smell/replace-urlopen.sh +++ b/test/code-smell/replace-urlopen.sh @@ -4,6 +4,7 @@ BASEDIR=${1-"."} URLLIB_USERS=$(find "$BASEDIR" -name '*.py' -exec grep -H urlopen \{\} \;) URLLIB_USERS=$(echo "$URLLIB_USERS" | sed '/\(\n\|lib\/ansible\/module_utils\/urls.py\|lib\/ansible\/compat\/six\/_six.py\|.tox\)/d') +URLLIB_USERS=$(echo "$URLLIB_USERS" | sed '/^[^:]\+:#/d') if test -n "$URLLIB_USERS" ; then printf "$URLLIB_USERS" exit 1