From ece0dc4ccef96142c754f27c1a8984b88b90a015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Wed, 10 May 2017 17:24:37 +0200 Subject: [PATCH] python-r1.eclass: python_setup, use _python_impl_matches() --- eclass/python-r1.eclass | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass index 99dfc50281293..f26233f7e8558 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