[Yum-devel] [PATCH] Usernames can contain unicode, so make them unicode. Fixes BZ 531338

James Antill james at and.org
Tue Oct 27 20:09:39 UTC 2009


---
 output.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/output.py b/output.py
index 996b89a..9635473 100755
--- a/output.py
+++ b/output.py
@@ -1207,7 +1207,7 @@ to exit.
             name = _("System") + " " + loginid
             if limit is not None and len(name) > limit:
                 name = loginid
-            return name
+            return to_unicode(name)
 
         try:
             user = pwd.getpwuid(uid)
@@ -1217,9 +1217,9 @@ to exit.
                 name = "%s ... <%s>" % (fullname.split()[0], user.pw_name)
                 if len(name) > limit:
                     name = "<%s>" % user.pw_name
-            return name
+            return to_unicode(name)
         except KeyError:
-            return str(uid)
+            return to_unicode(str(uid))
 
     def _history_list_transactions(self, extcmds):
         tids = set()
-- 
1.6.2.5



More information about the Yum-devel mailing list