[yum-git] output.py

Tim Lauridsen timlau at linux.duke.edu
Thu Feb 7 08:48:07 UTC 2008


 output.py |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 84372c70d665998b744201903a05c68efe8932be
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date:   Thu Feb 7 09:47:03 2008 +0100

    Make sure all strings are unicode in listTransaction, to avoid UnicodeDecodeError on non US locales

diff --git a/output.py b/output.py
index c575fec..a6cd49c 100644
--- a/output.py
+++ b/output.py
@@ -475,13 +475,13 @@ class YumOutput:
         
         self.tsInfo.makelists()
         if len(self.tsInfo) > 0:
-            out = """
+            out = u"""
 =============================================================================
  %-22s  %-9s  %-15s  %-16s  %-5s
 =============================================================================
 """ % (_('Package'), _('Arch'), _('Version'), _('Repository'), _('Size'))
         else:
-            out = ""
+            out = u""
 
         for (action, pkglist) in [(_('Installing'), self.tsInfo.installed),
                             (_('Updating'), self.tsInfo.updated),
@@ -490,14 +490,14 @@ class YumOutput:
                             (_('Updating for dependencies'), self.tsInfo.depupdated),
                             (_('Removing for dependencies'), self.tsInfo.depremoved)]:
             if pkglist:
-                totalmsg = "%s:\n" % action
+                totalmsg = u"%s:\n" % action
             for txmbr in pkglist:
                 (n,a,e,v,r) = txmbr.pkgtup
                 evr = txmbr.po.printVer()
                 repoid = txmbr.repoid
                 pkgsize = float(txmbr.po.size)
                 size = self.format_number(pkgsize)
-                msg = " %-22s  %-9s  %-15s  %-16s  %5s\n" % (n, a,
+                msg = u" %-22s  %-9s  %-15s  %-16s  %5s\n" % (n, a,
                               evr, repoid, size)
                 for obspo in txmbr.obsoletes:
                     appended = _('     replacing  %s.%s %s\n\n') % (obspo.name,



More information about the Yum-cvs-commits mailing list