From 0d7e395a3227264ff8bcc2c35d024c2b39e07679 Mon Sep 17 00:00:00 2001 From: Andy Kittner Date: Thu, 27 Jan 2011 00:21:21 +0100 Subject: Fix unicode vs. bytes issue in glsa-check (#341293) http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=01d40ffed91033119bae05dac5c9cea86b94aa2e --- pym/portage/glsa.py | 1 + 1 file changed, 1 insertion(+) (limited to 'pym') diff --git a/pym/portage/glsa.py b/pym/portage/glsa.py index c0c69dd2d..1dd8a98b9 100644 --- a/pym/portage/glsa.py +++ b/pym/portage/glsa.py @@ -604,6 +604,7 @@ class Glsa: @param outfile: Stream that should be used for writing (defaults to sys.stdout) """ + outstream = getattr(outstream, "buffer", outstream) outstream = codecs.getwriter(encoding)(outstream) width = 76 outstream.write(("GLSA %s: \n%s" % (self.nr, self.title)).center(width)+"\n") -- cgit v1.2.3-1-g7c22