Description of problem: The system-logviewer application crashes with a Python error if the LANG environment variable is not set. The trace is included below. Version-Release number of selected component (if applicable): system-logviewer-0.9.11-1 How reproducible: Every time. Steps to Reproduce: 1. open a terminal window 2. unset LANG 2. system-logviewer Actual results: Traceback (most recent call last): File "/usr/share/system-logviewer/system-logviewer.py", line 80, in ? LogViewerGui.LogViewerGui(width,height, allowConfigChanges, configFile,initialView) File "/usr/share/system-logviewer/LogViewerGui.py", line 163, in __init__ self.initial_read_of_file() File "/usr/share/system-logviewer/LogViewerGui.py", line 355, in initial_read_of_file logClassInstance = LogFileClass.LogFileClass(key) File "/usr/share/system-logviewer/LogFileClass.py", line 74, in __init__ self.read_log(self.prefName) File "/usr/share/system-logviewer/LogFileClass.py", line 141, in read_log self.buffer.insert_into_buffer_at_offset(iter, line) File "/usr/share/system-logviewer/LogBuffer.py", line 71, in insert_into_buffer_at_offset langEnVar = os.environ["LANG"] File "/usr/lib/python2.3/UserDict.py", line 19, in __getitem__ def __getitem__(self, key): return self.data[key] KeyError: 'LANG' Expected results: The log viewer window to appear. Additional info: I do not recall having this issue with the original FC3 installation, it occurred just after I had applied the latest FC3 updates. Note that my FC3 is an upgrade of RHL9.
Just to clear, if you export LANG=something prior to running system-logviewer then the window will come up just fine.
New strategy for determining language: (1) check $LANG, (2) check /etc/sysconfig/i18n, (3) default to en_US.UTF-8. Closed.