From 812c9ee0778547c0fb918ce4b62c7ba3957f6727 Mon Sep 17 00:00:00 2001 From: Paul Varner Date: Tue, 9 Mar 2010 16:42:04 +0000 Subject: 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 --- bin/glsa-check | 7 +++++++ 1 file changed, 7 insertions(+) mode change 100644 => 100755 bin/glsa-check (limited to 'bin') diff --git a/bin/glsa-check b/bin/glsa-check old mode 100644 new mode 100755 index 2b21d717f..3d047b54d --- 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") -- cgit v1.2.3-1-g7c22