2016-12-14 01:39:03 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
ITERKEYS_USERS=$(grep -r -I iterkeys . \
|
|
|
|
--exclude-dir .git \
|
|
|
|
--exclude-dir .tox \
|
2017-03-02 21:36:46 +01:00
|
|
|
--exclude-dir .idea \
|
2016-12-14 01:39:03 +01:00
|
|
|
--exclude-dir docsite \
|
2017-03-02 21:36:46 +01:00
|
|
|
--exclude-dir results \
|
2016-12-14 01:39:03 +01:00
|
|
|
| grep -v \
|
|
|
|
-e lib/ansible/compat/six/_six.py \
|
|
|
|
-e lib/ansible/module_utils/six.py \
|
|
|
|
-e test/sanity/code-smell/no-iterkeys.sh \
|
|
|
|
-e '^[^:]*:#'
|
|
|
|
)
|
|
|
|
|
|
|
|
if [ "${ITERKEYS_USERS}" ]; then
|
|
|
|
echo 'iterkeys has been removed in python3. Use "for KEY in DICT:" instead'
|
|
|
|
echo "${ITERKEYS_USERS}"
|
|
|
|
exit 1
|
|
|
|
fi
|