From 01d40ffed91033119bae05dac5c9cea86b94aa2e 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) --- pym/gentoolkit/glsa/__init__.py | 1 + 1 file changed, 1 insertion(+) (limited to 'pym') diff --git a/pym/gentoolkit/glsa/__init__.py b/pym/gentoolkit/glsa/__init__.py index ab03947..af97ac6 100644 --- a/pym/gentoolkit/glsa/__init__.py +++ b/pym/gentoolkit/glsa/__init__.py @@ -622,6 +622,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 = int(self.config["PRINTWIDTH"]) outstream.write(center("GLSA %s: \n%s" % (self.nr, self.title), width)+"\n") -- cgit v1.2.3