[GRASS-SVN] r46100 -
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Apr 25 06:03:20 EDT 2011
Author: martinl
Date: 2011-04-25 03:03:20 -0700 (Mon, 25 Apr 2011)
New Revision: 46100
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/globalvar.py
Log:
wxGUI: ensure that wxversion.ensureMinimal() is not called when wx
modules is already imported
(merge r46096 from trunk)
Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/globalvar.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/globalvar.py 2011-04-25 10:01:33 UTC (rev 46099)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/globalvar.py 2011-04-25 10:03:20 UTC (rev 46100)
@@ -33,9 +33,6 @@
sys.path.append(os.path.join(ETCDIR, "python"))
import grass.script as grass
-# wxversion.select() called once at the beginning
-check = True
-
def CheckWxVersion(version = [2, 8, 11, 0]):
"""!Check wx version"""
ver = wx.version().split(' ')[0]
@@ -46,9 +43,9 @@
def CheckForWx():
"""!Try to import wx module and check its version"""
- global check
- if not check:
+ if 'wx' in sys.modules.keys():
return
+
minVersion = [2, 8, 1, 1]
try:
try:
@@ -73,9 +70,7 @@
except locale.Error, e:
print >> sys.stderr, "Unable to set locale:", e
os.environ['LC_ALL'] = ''
-
- check = False
-
+
if not os.getenv("GRASS_WXBUNDLED"):
CheckForWx()
import wx
More information about the grass-commit
mailing list