summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorPaul Varner <fuzzyray@gentoo.org>2010-03-09 16:42:04 +0000
committerZac Medico <zmedico@gentoo.org>2013-01-18 20:59:00 -0800
commit812c9ee0778547c0fb918ce4b62c7ba3957f6727 (patch)
tree14661aff655aa9991da0bc8a7de0f8a1be6424dd /bin
parent8b61e83f8f88f035eaea3d0305d565b507cbdc3d (diff)
downloadportage-812c9ee0778547c0fb918ce4b62c7ba3957f6727.tar.gz
portage-812c9ee0778547c0fb918ce4b62c7ba3957f6727.tar.bz2
portage-812c9ee0778547c0fb918ce4b62c7ba3957f6727.zip
sync with genscripts rev 343. This adds the initial py3k support and the analyse utility to gentoolkit
svn path=/trunk/gentoolkit/; revision=751 http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=2f90a4b9ceff920f793541376da21d313af083d9
Diffstat (limited to 'bin')
-rwxr-xr-x[-rw-r--r--]bin/glsa-check7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/glsa-check b/bin/glsa-check
index 2b21d717f..3d047b54d 100644..100755
--- a/bin/glsa-check
+++ b/bin/glsa-check
@@ -142,6 +142,13 @@ for p in params[:]:
glsalist.extend([g for g in params if g not in glsalist])
def summarylist(myglsalist, fd1=sys.stdout, fd2=sys.stderr, encoding="utf-8"):
+ # Get to the raw streams in py3k before wrapping them with an encoded writer
+ # to avoid writing bytes to a text stream (stdout/stderr are text streams
+ # by default in py3k)
+ if hasattr(fd1, "buffer"):
+ fd1 = fd1.buffer
+ if hasattr(fd2, "buffer"):
+ fd2 = fd2.buffer
fd1 = codecs.getwriter(encoding)(fd1)
fd2 = codecs.getwriter(encoding)(fd2)
fd2.write(white("[A]")+" means this GLSA was marked as applied (injected),\n")