travis: Use lsr_check_python_version

Richard Megginson suggested this in
https://github.com/linux-system-roles/network/pull/215#discussion_r420210849
This commit is contained in:
Till Maas 2020-05-05 19:30:01 +02:00
parent 47381469a1
commit 9510fe34a8

View file

@ -39,7 +39,8 @@
#
# - RUN_FLAKE8_DISABLED
# - RUN_FLAKE8_EXTRA_ARGS
if [[ "$(python -c "import sys; print(sys.version_info.major)")" == "2" ]]
type -f lsr_check_python_version > /dev/null 2>&1 || . ${SCRIPTDIR}/utils.sh
if lsr_check_python_version python -lt 3.0
then
PYTHON2_EXCLUDES="tests/ensure_provider_tests.py"
FLAKE8_DEFAULT_EXCLUDES=".svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg"