2016-12-14 00:39:03 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
ITERKEYS_USERS=$(grep -r -I iterkeys . \
|
|
|
|
--exclude-dir .git \
|
|
|
|
--exclude-dir .tox \
|
2017-03-02 20:36:46 +00:00
|
|
|
--exclude-dir .idea \
|
2016-12-14 00:39:03 +00:00
|
|
|
--exclude-dir docsite \
|
2017-03-02 20:36:46 +00:00
|
|
|
--exclude-dir results \
|
2016-12-14 00:39:03 +00:00
|
|
|
| grep -v \
|
2017-03-23 20:35:05 +00:00
|
|
|
-e lib/ansible/module_utils/six/_six.py \
|
2016-12-14 00:39:03 +00:00
|
|
|
-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
|