2015-09-15 16:58:52 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-11-08 01:46:33 +01:00
|
|
|
urllib_users=$(find . -name '*.py' -exec grep -H urlopen '{}' '+' | grep -v \
|
|
|
|
-e '^[^:]*/.tox/' \
|
|
|
|
-e '^\./lib/ansible/module_utils/urls.py:' \
|
2017-03-23 21:35:05 +01:00
|
|
|
-e '^\./lib/ansible/module_utils/six/_six.py:' \
|
2016-11-08 01:46:33 +01:00
|
|
|
-e '^[^:]*:#'
|
|
|
|
)
|
2015-09-15 16:58:52 +02:00
|
|
|
|
2016-11-08 01:46:33 +01:00
|
|
|
if [ "${urllib_users}" ]; then
|
|
|
|
echo "${urllib_users}"
|
|
|
|
echo "One or more file(s) listed above use urlopen."
|
|
|
|
echo "Use open_url from module_utils instead of urlopen."
|
|
|
|
exit 1
|
2015-09-15 16:58:52 +02:00
|
|
|
fi
|