Red Hat Bugzilla – Bug 1254775
hangs when run with language other than English under Python 3
Last modified: 2015-08-26 00:33:19 EDT
Created attachment 1064474 [details]
fix the bug (by swiping the _ definition from anaconda)
system-config-language runs OK in Python 3 in English, or in Python 2 in any other language, but when running in a non-English language in Python 3 it hangs such that it can't even be ctrl-C'ed (has to be kill'ed from another terminal):
root@adam system-config-language (master *%)]# LANGUAGE=de_DE.UTF-8 /usr/share/system-config-language/system-config-language.py
Traceback (most recent call last):
File "/usr/share/system-config-language/language_gui.py", line 341, in do_activate
win = ChildWindow(self)
File "/usr/share/system-config-language/language_gui.py", line 41, in __init__
self.title = Gtk.Label.new(_("Language Selection"))
TypeError: Must be string, not bytes
This can be fixed by swiping anaconda's definition of '_' (the conventional name for the function for 'translate this string'). One of system-config-language's files currently defines it as 'gettext.gettext', which seems to cause the hang.
Patch attached. I just stole anaconda's '_' definition. Tested in both py2 and py3. I'll apply this patch in the package spec for now, once it's applied upstream it can be removed from the package.
system-config-language-3.2.0-2.fc23 has been submitted as an update to Fedora 23. https://bugzilla.redhat.com/show_bug.cgi?id=1254775
system-config-language-3.2.0-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update system-config-language'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-13792
system-config-language-3.2.0-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.