[GRASS-SVN] r41349 -
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Mar 8 10:44:48 EST 2010
Author: martinl
Date: 2010-03-08 10:44:47 -0500 (Mon, 08 Mar 2010)
New Revision: 41349
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gcmd.py
Log:
wxGUI: encode message only if locales are defined
Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gcmd.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gcmd.py 2010-03-08 13:59:35 UTC (rev 41348)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gcmd.py 2010-03-08 15:44:47 UTC (rev 41349)
@@ -447,8 +447,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 ''
def PrintModuleOutput(self, error=True, warning=False, message=False):
More information about the grass-commit
mailing list