2015-09-15 14:58:52 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
BASEDIR=${1-"."}
|
|
|
|
|
|
|
|
URLLIB_USERS=$(find "$BASEDIR" -name '*.py' -exec grep -H urlopen \{\} \;)
|
2016-03-23 15:49:37 +00:00
|
|
|
URLLIB_USERS=$(echo "$URLLIB_USERS" | sed '/\(\n\|lib\/ansible\/module_utils\/urls.py\|lib\/ansible\/compat\/six\/_six.py\|.tox\)/d')
|
2016-04-22 15:24:14 +00:00
|
|
|
URLLIB_USERS=$(echo "$URLLIB_USERS" | sed '/^[^:]\+:#/d')
|
2015-09-15 14:58:52 +00:00
|
|
|
if test -n "$URLLIB_USERS" ; then
|
|
|
|
printf "$URLLIB_USERS"
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
exit 0
|
|
|
|
fi
|