commit:     375eb5c02df19833ddeb2c63438aac9faf3d5eae
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 17 08:35:41 2021 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Jan 17 08:46:23 2021 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=375eb5c0

vardbapi.move_ent: remove redundant self._pkg_str calls

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

 lib/portage/dbapi/vartree.py | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/lib/portage/dbapi/vartree.py b/lib/portage/dbapi/vartree.py
index f3d74cf82..2c75be4a1 100644
--- a/lib/portage/dbapi/vartree.py
+++ b/lib/portage/dbapi/vartree.py
@@ -1,4 +1,4 @@
-# Copyright 1998-2020 Gentoo Authors
+# Copyright 1998-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 __all__ = [
@@ -372,11 +372,7 @@ class vardbapi(dbapi):
                if not origmatches:
                        return moves
                for mycpv in origmatches:
-                       try:
-                               mycpv = self._pkg_str(mycpv, None)
-                       except (KeyError, InvalidData):
-                               continue
-                       mycpv_cp = cpv_getkey(mycpv)
+                       mycpv_cp = mycpv.cp
                        if mycpv_cp != origcp:
                                # Ignore PROVIDE virtual match.
                                continue

Reply via email to