summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2008-03-24 19:27:16 -0400
committerJeremy Katz <katzj@redhat.com>2008-03-24 19:28:41 -0400
commit8735fbba4469f0350ca875b7af44f6930f4c6e44 (patch)
treef5b38550f17af423f5d476d1d8bc295f821fdc24
parentb167a920ec87a1afc98589fb960142f8618faa74 (diff)
downloadanaconda-8735fbba4469f0350ca875b7af44f6930f4c6e44.tar.gz
anaconda-8735fbba4469f0350ca875b7af44f6930f4c6e44.tar.xz
anaconda-8735fbba4469f0350ca875b7af44f6930f4c6e44.zip
Fix up more unicode shenanigans (#437993)
Ensure we encode/decode to utf8 at appropriate points to avoid tracebacks in text mode
-rw-r--r--textw/progress_text.py2
-rw-r--r--yuminstall.py5
2 files changed, 5 insertions, 2 deletions
diff --git a/textw/progress_text.py b/textw/progress_text.py
index b8617841c..c9994d2b9 100644
--- a/textw/progress_text.py
+++ b/textw/progress_text.py
@@ -40,7 +40,7 @@ def strip_markup(text):
continue
elif not inTag:
r += c
- return r
+ return r.encode("utf-8")
class InstallProgressWindow:
def __init__(self, screen):
diff --git a/yuminstall.py b/yuminstall.py
index 2a64ef4ea..75b17f7d8 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -157,7 +157,10 @@ class AnacondaCallback:
pkgStr = "%s-%s-%s.%s" % (po.name, po.version, po.release, po.arch)
s = _("<b>Installing %s</b> (%s)\n") %(pkgStr, size_string(hdr['size']))
- s += (hdr['summary'] or "")
+ sum = hdr['summary'] or ""
+ if type(sum) != unicode:
+ sum = unicode(sum, encoding='utf-8')
+ s += sum
self.progress.set_label(s)
self.instLog.write(self.modeText % pkgStr)