diff options
| author | fuzzyray <fuzzyray@gentoo.org> | 2009-05-20 21:35:12 +0000 |
|---|---|---|
| committer | fuzzyray <fuzzyray@gentoo.org> | 2009-05-20 21:35:12 +0000 |
| commit | 88c18ffe936e602c45dcaa7500961623c49697ca (patch) | |
| tree | d06655cf0dea3de6daf4ccaa1626ce0549cf3166 /bin/glsa-check | |
| parent | 545d7f4a65d03431b901e22891259a773d4c88eb (diff) | |
| download | gentoolkit-88c18ffe936e602c45dcaa7500961623c49697ca.tar.gz | |
Handle unicode encoding when dumping to stdout and start migration to using StringIO
svn path=/trunk/gentoolkit/; revision=645
Diffstat (limited to 'bin/glsa-check')
| -rw-r--r-- | bin/glsa-check | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/glsa-check b/bin/glsa-check index f33bc23..9b99451 100644 --- a/bin/glsa-check +++ b/bin/glsa-check @@ -5,6 +5,7 @@ import os import sys +import codecs try: import portage except ImportError: @@ -199,7 +200,9 @@ 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): +def summarylist(myglsalist, fd1=sys.stdout, fd2=sys.stderr, encoding="utf-8"): + fd1 = codecs.getwriter(encoding)(fd1) + fd2 = codecs.getwriter(encoding)(fd2) if not quiet: fd2.write(white("[A]")+" means this GLSA was already applied,\n") fd2.write(green("[U]")+" means the system is not affected and\n") |
