tags 584478 + patch
thanks

* yellow <[email protected]>, 2010-06-03, 22:13:
Traceback (most recent call last):
 File "/usr/bin/pyroom", line 35, in <module>
   import sys, PyRoom.cmdline
 File "/usr/lib/python2.5/site-packages/PyRoom/__init__.py", line 34, in 
<module>
   fallback=True)
 File "/usr/lib/python2.5/gettext.py", line 465, in translation
   mofiles = find(domain, localedir, languages, all=1)
 File "/usr/lib/python2.5/gettext.py", line 437, in find
   for nelang in _expand_lang(lang):
 File "/usr/lib/python2.5/gettext.py", line 132, in _expand_lang
   locale = normalize(locale)
 File "/usr/lib/python2.5/locale.py", line 298, in normalize
   fullname = localename.lower()
AttributeError: 'list' object has no attribute 'lower'

The attached patch fixes this bug.

--
Jakub Wilk
Description: Fix crash whan LANGUAGE is set.
Author: Jakub Wilk <[email protected]>

--- pyroom-0.4.1.orig/PyRoom/__init__.py
+++ pyroom-0.4.1/PyRoom/__init__.py
@@ -23,7 +23,7 @@ if lc:
     languages_used = [lc]
 lang_in_env = os.environ.get('LANGUAGE', None)
 if lang_in_env:
-    languages_used.append(lang_in_env.split())
+    languages_used += lang_in_env.split()
 
 for module in gettext, glade:
     module.bindtextdomain(GETTEXT_DOMAIN, LOCALE_PATH)

Attachment: signature.asc
Description: Digital signature

Reply via email to