From 29f7a4ba834261f4da971b0bdd98a5c86637a632 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 30 Sep 2010 21:37:23 -0700 Subject: [PATCH] Merge findname2/findLicensePath diff from master. --- pym/portage/dbapi/porttree.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index 0065ed3b8..c72e17812 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -349,9 +349,7 @@ class portdbapi(dbapi): x.sync() def findLicensePath(self, license_name): - mytrees = self.porttrees[:] - mytrees.reverse() - for x in mytrees: + for x in reversed(self.porttrees): license_path = os.path.join(x, "licenses", license_name) if os.access(license_path, os.R_OK): return license_path @@ -413,8 +411,7 @@ class portdbapi(dbapi): if mytree: mytrees = [mytree] else: - mytrees = self.porttrees[:] - mytrees.reverse() + mytrees = reversed(self.porttrees) relative_path = mysplit[0] + _os.sep + psplit[0] + _os.sep + \ mysplit[1] + ".ebuild" -- 2.26.2