[GRASS-SVN] r30514 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Mar 9 19:32:01 EDT 2008


Author: martinl
Date: 2008-03-09 19:31:57 -0400 (Sun, 09 Mar 2008)
New Revision: 30514

Modified:
   grass/trunk/gui/wxpython/gui_modules/globalvar.py
Log:
wxGUI: avoid crashing when locale fails

Modified: grass/trunk/gui/wxpython/gui_modules/globalvar.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/globalvar.py	2008-03-09 22:57:15 UTC (rev 30513)
+++ grass/trunk/gui/wxpython/gui_modules/globalvar.py	2008-03-09 23:31:57 UTC (rev 30514)
@@ -17,11 +17,18 @@
 """
 
 import os
+import sys
+import locale
 
 ### recursive import problem 
 # import utils
 # utils.CheckForWx()
-import wx
+try:
+    import wx
+except locale.Error, e:
+    print >> sys.stderr, "Unable to set locale:", e
+    os.environ['LC_ALL'] = ''
+    import wx
 import wx.lib.flatnotebook as FN
 
 try:



More information about the grass-commit mailing list