2fff690caa
* Update module_utils.six to latest We've been held back on the version of six we could use on the module side to 1.4.x because of python-2.4 compatibility. Now that our minimum is Python-2.6, we can update to the latest version of six in module_utils and get rid of the second copy in lib/ansible/compat.
19 lines
571 B
Bash
Executable file
19 lines
571 B
Bash
Executable file
#!/bin/sh
|
|
|
|
ITERITEMS_USERS=$(grep -rI '\.iteritems' . \
|
|
--exclude-dir .git \
|
|
--exclude-dir .tox \
|
|
--exclude-dir docsite \
|
|
| grep -v \
|
|
-e 'six\.iteritems' \
|
|
-e lib/ansible/module_utils/six/_six.py \
|
|
-e test/sanity/code-smell/no-dict-iteritems.sh \
|
|
)
|
|
|
|
if [ "${ITERITEMS_USERS}" ]; then
|
|
echo 'iteritems has been removed in python3. Alternatives:'
|
|
echo ' for KEY, VALUE in DICT.items():'
|
|
echo ' from ansible.module_utils.six import iteritems ; for KEY, VALUE in iteritems(DICT):'
|
|
echo "${ITERITEMS_USERS}"
|
|
exit 1
|
|
fi
|