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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Feb 11 04:34:43 EST 2008


Author: martinl
Date: 2008-02-11 04:34:42 -0500 (Mon, 11 Feb 2008)
New Revision: 30074

Modified:
   grass/trunk/gui/wxpython/gui_modules/digit.py
Log:
wxGUI: digitization tool fails on missing driver in 'user-friendly way'

Modified: grass/trunk/gui/wxpython/gui_modules/digit.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/digit.py	2008-02-10 23:14:26 UTC (rev 30073)
+++ grass/trunk/gui/wxpython/gui_modules/digit.py	2008-02-11 09:34:42 UTC (rev 30074)
@@ -53,9 +53,9 @@
     GV_LINES = vdigit.GV_LINES
 except ImportError, err:
     GV_LINES = None
-    print >> sys.stderr, "%sWARNING: Digitization tool is disabled (%s). " \
-          "Detailed information in README file." % \
-          (os.linesep, err)
+#    print >> sys.stderr, "%sWARNING: Digitization tool is disabled (%s). " \
+#          "Detailed information in README file." % \
+#          (os.linesep, err)
 
 # which interface to use?
 if UserSettings.Get('digitInterface') == 'vedit' and GV_LINES is not None:
@@ -181,7 +181,11 @@
         Debug.msg (3, "AbstractDigit.SetMapName map=%s" % map)
         self.map = map
 
-        ret = self.driver.Reset(self.map)
+        try:
+            ret = self.driver.Reset(self.map)
+        except:
+            raise gcmd.DigitError('Unable to initialize display driver, see README file for more information.')
+        
         if map and ret == -1:
             raise gcmd.DigitError(_('Unable to open vector map <%s> for editing. The vector map is probably broken. '
                                'Try to run v.build for rebuilding the topology.') % map)



More information about the grass-commit mailing list