From 6d5e8c9cd785bceaa6b4f1c6e49399a72a73b956 Mon Sep 17 00:00:00 2001 From: Brian Evans Date: Tue, 17 Jul 2018 11:26:20 -0400 Subject: pkglist.py: Have print statement work in both Python 2 and 3 --- pkg_lists/pkglist.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkg_lists/pkglist.py b/pkg_lists/pkglist.py index 9777401..0b6e9ec 100755 --- a/pkg_lists/pkglist.py +++ b/pkg_lists/pkglist.py @@ -1,5 +1,4 @@ #!/usr/bin/python -# $Id: pkglist.py,v 1.1 2005/11/24 23:45:54 ramereth Exp $ import portage @@ -8,13 +7,11 @@ bestpkgs={} mycount=0 for x in allpkgs: - if x not in bestpkgs.keys(): + if x not in list(bestpkgs.keys()): y=portage.db["/"]["porttree"].dbapi.xmatch("bestmatch-visible", x) bestpkgs[x]=y if y=="": continue xs=portage.pkgsplit(bestpkgs[x]) - print xs[0].split("/")[1], - print xs[1], - print bestpkgs[x] + print('%s %s %s' % (xs[0].split("/")[1], xs[1], bestpkgs[x])) mycount+=1 -- cgit v1.2.3-65-gdbad