Fix urlopen usage to use open_url instead

Add a travis test for urlopen usage
This commit is contained in:
Toshio Kuratomi
2015-09-15 07:58:52 -07:00
parent e97d448838
commit 3db8070aa3
9 changed files with 52 additions and 54 deletions

View File

@@ -0,0 +1,12 @@
#!/bin/sh
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\)/d')
if test -n "$URLLIB_USERS" ; then
printf "$URLLIB_USERS"
exit 1
else
exit 0
fi