[GRASS-SVN] r39494 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Oct 12 15:49:32 EDT 2009
Author: martinl
Date: 2009-10-12 15:49:31 -0400 (Mon, 12 Oct 2009)
New Revision: 39494
Modified:
grass/trunk/gui/wxpython/gui_modules/globalvar.py
Log:
fail gracefully if wxversion module is missing
Modified: grass/trunk/gui/wxpython/gui_modules/globalvar.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/globalvar.py 2009-10-12 18:46:27 UTC (rev 39493)
+++ grass/trunk/gui/wxpython/gui_modules/globalvar.py 2009-10-12 19:49:31 UTC (rev 39494)
@@ -1,4 +1,4 @@
-"""
+"""!
@package global.py
@brief Global variables
@@ -6,7 +6,7 @@
This module provide the space for global variables
used in the code.
-(C) 2007 by the GRASS Development Team
+(C) 2007-2009 by the GRASS Development Team
This program is free software under the GNU General Public
License (>=v2). Read the file COPYING that comes with GRASS
@@ -34,7 +34,10 @@
minVersion = [2, 8, 1, 1]
try:
- import wxversion
+ try:
+ import wxversion
+ except ImportError, e:
+ raise ImportError(e)
wxversion.select(str(minVersion[0]) + '.' + str(minVersion[1]))
import wx
version = wx.version().split(' ')[0]
@@ -46,7 +49,7 @@
sys.exit(1)
except (ValueError, wxversion.VersionError), e:
print >> sys.stderr, 'ERROR: wxGUI requires wxPython >= %d.%d.%d.%d. ' % tuple(minVersion) + \
- '%s. Detailed information in README file.' % (str(e))
+ '%s.' % (str(e))
sys.exit(1)
except locale.Error, e:
print >> sys.stderr, "Unable to set locale:", e
More information about the grass-commit
mailing list