[GRASS-SVN] r70935 - grass/trunk/gui/wxpython/core

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Apr 22 13:59:15 PDT 2017


Author: martinl
Date: 2017-04-22 13:59:15 -0700 (Sat, 22 Apr 2017)
New Revision: 70935

Modified:
   grass/trunk/gui/wxpython/core/globalvar.py
Log:
wxGUI: fix CheckWxVersion() to support also 4.0.0aX

Modified: grass/trunk/gui/wxpython/core/globalvar.py
===================================================================
--- grass/trunk/gui/wxpython/core/globalvar.py	2017-04-22 20:17:57 UTC (rev 70934)
+++ grass/trunk/gui/wxpython/core/globalvar.py	2017-04-22 20:59:15 UTC (rev 70935)
@@ -55,7 +55,10 @@
 def CheckWxVersion(version):
     """Check wx version"""
     ver = wx.__version__
-    if map(int, ver.split('.')) < version:
+    # don't fail on wxPython 4.0.0aX
+    if 'a' in ver: # can be removed when 4.0.0 will be out
+        ver = ver[0:ver.find('a')]
+    if list(map(int, ver.split('.'))) < version:
         return False
 
     return True



More information about the grass-commit mailing list