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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 3 11:36:17 EDT 2009


Author: martinl
Date: 2009-08-03 11:36:17 -0400 (Mon, 03 Aug 2009)
New Revision: 38599

Modified:
   grass/trunk/gui/wxpython/gui_modules/globalvar.py
Log:
fix UnboundLocalError


Modified: grass/trunk/gui/wxpython/gui_modules/globalvar.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/globalvar.py	2009-08-03 15:19:22 UTC (rev 38598)
+++ grass/trunk/gui/wxpython/gui_modules/globalvar.py	2009-08-03 15:36:17 UTC (rev 38599)
@@ -41,7 +41,10 @@
         if map(int, version.split('.')) < minVersion:
             raise ValueError('Your wxPython version is %s.%s.%s.%s' % tuple(version.split('.')))
 
-    except (ImportError, ValueError, wxversion.VersionError), e:
+    except ImportError, e:
+        print >> sys.stderr, 'ERROR: wxGUI requires wxPython. %s' % str(e)
+        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))
         sys.exit(1)



More information about the grass-commit mailing list