virt-manager exited with error: Traceback (most recent call last): File "/usr/share/virt-manager/virt-manager.py", line 467, in <module> main() File "/usr/share/virt-manager/virt-manager.py", line 321, in main setup_i18n() File "/usr/share/virt-manager/virt-manager.py", line 80, in setup_i18n gettext.install(gettext_app, gettext_dir) File "/usr/lib64/python2.6/gettext.py", line 493, in install t = translation(domain, localedir, fallback=True, codeset=codeset) File "/usr/lib64/python2.6/gettext.py", line 478, in translation t = _translations.setdefault(key, class_(open(mofile, 'rb'))) File "/usr/lib64/python2.6/gettext.py", line 180, in __init__ self._parse(fp) File "/usr/lib64/python2.6/gettext.py", line 314, in _parse plural = v[1].split('plural=')[1] IndexError: list index out of range This problem was actually resolved in RedHat almost 3 month ago: https://bugzilla.redhat.com/show_bug.cgi?id=692632. As Ignacio Vazquez-Abrams pointed out, this is actually virt-manager problem with buggy po/cs.po, but python solved this problem "ungracefully". Patch created by Cole Robinson is present in redhat bugzilla and is functional for python-2.6 which I'm using now. Redhat bugzilla complaint was about python-2.7 which is probably affected too on Gentoo according no important difference between /usr/lib64/python2.6/gettext.py and /usr/lib64/python2.7/gettext.py files. Cole Robinson's original patch: diff -rup Python-2.7.1/Lib/gettext.py new/Lib/gettext.py --- Python-2.7.1/Lib/gettext.py 2011-04-01 11:46:04.000000000 -0400 +++ new/Lib/gettext.py 2011-04-01 11:53:09.000000000 -0400 @@ -313,7 +313,12 @@ class GNUTranslations(NullTranslations): self._charset = v.split('charset=')[1] elif k == 'plural-forms': v = v.split(';') - plural = v[1].split('plural=')[1] + if len(v) < 2: + continue + v = v[1].split('plural=') + if len(v) < 2: + continue + plural = v[1] self.plural = c2py(plural) # Note: we unconditionally convert both msgids and msgstrs to # Unicode using the character encoding specified in the charset ---------------------------------------------------------------------------- Reproducible: Always Steps to Reproduce: 1. run virt-manager with Czech locale 2. 3. Actual Results: python's traceback and no virt-manager at all. Expected Results: virt-manager running
I'm going to see if upstream wants to take something like this. (I've commented on http://bugs.python.org/issue1475523 for now.)
Is this bug still present in current virt-viewer-3.0 and currently stable python?