commit:     9003c5201c6503ddad9237bcffbc6f775567661b
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  4 19:23:45 2021 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Mar  6 09:01:38 2021 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=9003c520

Remove Python 2 workaround

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/__init__.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py
index 24c9d8b89..d33792a77 100644
--- a/lib/portage/__init__.py
+++ b/lib/portage/__init__.py
@@ -484,11 +484,7 @@ def _eapi_is_deprecated(eapi):
        return eapi in _deprecated_eapis
 
 def eapi_is_supported(eapi):
-       if not isinstance(eapi, str):
-               # Only call str() when necessary since with python2 it
-               # can trigger UnicodeEncodeError if EAPI is corrupt.
-               eapi = str(eapi)
-       eapi = eapi.strip()
+       eapi = str(eapi).strip()
 
        return eapi in _supported_eapis
 

Reply via email to