Bug 1254775 - hangs when run with language other than English under Python 3
hangs when run with language other than English under Python 3
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: system-config-language (Show other bugs)
23
All All
unspecified Severity high
: ---
: ---
Assigned To: Parag Nemade
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-18 16:05 EDT by Adam Williamson
Modified: 2015-08-26 00:33 EDT (History)
4 users (show)

See Also:
Fixed In Version: 3.2.0-2.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-26 00:33:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
fix the bug (by swiping the _ definition from anaconda) (3.07 KB, application/mbox)
2015-08-18 16:05 EDT, Adam Williamson
no flags Details

  None (edit)
Description Adam Williamson 2015-08-18 16:05:37 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.
Comment 1 Fedora Update System 2015-08-20 02:49:19 EDT
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
Comment 2 Fedora Update System 2015-08-22 12:25:45 EDT
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
Comment 3 Fedora Update System 2015-08-26 00:33:17 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.