[GRASS-SVN] r41350 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Mar 8 10:47:00 EST 2010
Author: martinl
Date: 2010-03-08 10:47:00 -0500 (Mon, 08 Mar 2010)
New Revision: 41350
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/gcmd.py
Log:
wxGUI: encode message only if locales are defined
(merge r41349 from relbr64)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gcmd.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gcmd.py 2010-03-08 15:44:47 UTC (rev 41349)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gcmd.py 2010-03-08 15:47:00 UTC (rev 41350)
@@ -442,8 +442,12 @@
for type, msg in self.__ProcessStdErr():
if type == 'ERROR':
- return unicode(msg, locale.getdefaultlocale()[1])
-
+ enc = locale.getdefaultlocale()[1]
+ if enc:
+ return unicode(msg, enc)
+ else:
+ return msg
+
return ''
class CommandThread(Thread):
More information about the grass-commit
mailing list