commit:     6d5e8c9cd785bceaa6b4f1c6e49399a72a73b956
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 17 15:26:20 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Jul 17 15:26:20 2018 +0000
URL:        https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=6d5e8c9c

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

Reply via email to