From: Zac Medico Date: Fri, 1 Oct 2010 04:37:23 +0000 (-0700) Subject: Merge findname2/findLicensePath diff from master. X-Git-Tag: v2.1.9.13~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=29f7a4ba834261f4da971b0bdd98a5c86637a632;p=portage.git Merge findname2/findLicensePath diff from master. --- 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"