public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Matt Turner <mattst88@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Cc: Matt Turner <mattst88@gentoo.org>
Subject: [gentoo-portage-dev] [PATCH 1/3] Remove Python 2 workaround
Date: Thu,  4 Mar 2021 14:23:45 -0500	[thread overview]
Message-ID: <20210304192347.899796-1-mattst88@gentoo.org> (raw)

Signed-off-by: Matt Turner <mattst88@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 184db6ae2..1d202f557 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
 
-- 
2.26.2



             reply	other threads:[~2021-03-04 19:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04 19:23 Matt Turner [this message]
2021-03-04 19:23 ` [gentoo-portage-dev] [PATCH 2/3] Remove outdated mention of Python 2 from comment Matt Turner
2021-03-04 19:23 ` [gentoo-portage-dev] [PATCH 3/3] lib: Remove outdated Python 2 comments Matt Turner
2021-03-06  9:22   ` Zac Medico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210304192347.899796-1-mattst88@gentoo.org \
    --to=mattst88@gentoo.org \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox