[PATCHv2] Encode unicode strings from XklWrapper (#873762)

Vratislav Podzimek vpodzime at redhat.com
Fri Nov 9 12:14:59 UTC 2012


We don't use unicode strings (as a type) in anaconda.
XklWrapperr.switch_to_show_str should thus use encode("utf-8")
and also contain byte strings.

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 pyanaconda/keyboard.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyanaconda/keyboard.py b/pyanaconda/keyboard.py
index c8024af..f317398 100755
--- a/pyanaconda/keyboard.py
+++ b/pyanaconda/keyboard.py
@@ -403,7 +403,7 @@ class XklWrapper(object):
         name = item_str(item.name)
 
         self._switching_options.append(name)
-        self.switch_to_show_str[name] = desc
+        self.switch_to_show_str[name] = desc.encode("utf-8")
 
     def get_available_layouts(self):
         """A generator yielding layouts (no need to store them as a bunch)"""
-- 
1.7.11.7



More information about the anaconda-patches mailing list