From: Michał Górny Date: Wed, 10 May 2017 15:24:37 +0000 (+0200) Subject: python-r1.eclass: python_setup, use _python_impl_matches() X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=ece0dc4ccef96142c754f27c1a8984b88b90a015;p=gentoo.git python-r1.eclass: python_setup, use _python_impl_matches() --- diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass index 99dfc5028129..f26233f7e855 100644 --- a/eclass/python-r1.eclass +++ b/eclass/python-r1.eclass @@ -601,12 +601,9 @@ python_setup() { local best_impl patterns=( "${@-*}" ) _python_try_impl() { - local pattern - for pattern in "${patterns[@]}"; do - if [[ ${EPYTHON} == ${pattern} ]]; then - best_impl=${EPYTHON} - fi - done + if _python_impl_matches "${impl}" "${patterns[@]}"; then + best_impl=${EPYTHON} + fi } python_foreach_impl _python_try_impl unset -f _python_try_impl