[GRASS-SVN] r67909 - in grass/branches/releasebranch_7_0/gui/wxpython: iscatt timeline tplot

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Feb 20 09:16:40 PST 2016


Author: neteler
Date: 2016-02-20 09:16:40 -0800 (Sat, 20 Feb 2016)
New Revision: 67909

Modified:
   grass/branches/releasebranch_7_0/gui/wxpython/iscatt/plots.py
   grass/branches/releasebranch_7_0/gui/wxpython/timeline/frame.py
   grass/branches/releasebranch_7_0/gui/wxpython/tplot/frame.py
Log:
wxGUI: print more detailed error message in case of matplotlib failure (trunk, r67908)

Modified: grass/branches/releasebranch_7_0/gui/wxpython/iscatt/plots.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/iscatt/plots.py	2016-02-20 17:15:47 UTC (rev 67908)
+++ grass/branches/releasebranch_7_0/gui/wxpython/iscatt/plots.py	2016-02-20 17:16:40 UTC (rev 67909)
@@ -1,15 +1,15 @@
 """
 @package iscatt.plots
 
- at brief Ploting widgets.
+ at brief Plotting widgets
 
 Classes:
  - plots::ScatterPlotWidget
  - plots::PolygonDrawer
  - plots::ModestImage
- 
-(C) 2013 by the GRASS Development Team
 
+(C) 2013-2016 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 for details.
 
@@ -39,7 +39,8 @@
     import matplotlib.colors as mcolors
     import matplotlib.cbook as cbook
 except ImportError as e:
-    raise ImportError(_("Unable to import matplotlib (try to install it).\n%s") % e)
+    raise ImportError(_('The Scatterplot Tool needs the "matplotlib" '
+                        '(python-matplotlib) package to be installed. {}').format(e))
 
 import grass.script as grass
 from grass.pydispatch.signal import Signal

Modified: grass/branches/releasebranch_7_0/gui/wxpython/timeline/frame.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/timeline/frame.py	2016-02-20 17:15:47 UTC (rev 67908)
+++ grass/branches/releasebranch_7_0/gui/wxpython/timeline/frame.py	2016-02-20 17:16:40 UTC (rev 67909)
@@ -8,7 +8,7 @@
  - frame::TimelineFrame
  - frame::LookUp
 
-(C) 2012-2014 by the GRASS Development Team
+(C) 2012-2016 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 for details.
@@ -34,8 +34,9 @@
         NavigationToolbar2WxAgg as NavigationToolbar
     import matplotlib.dates as mdates
     from matplotlib import cbook
-except ImportError:
-    raise ImportError(_('The Timeline Tool needs the "matplotlib" (python-matplotlib) package to be installed.'))
+except ImportError as e:
+    raise ImportError(_('The Timeline Tool needs the "matplotlib" '
+                        '(python-matplotlib) package to be installed. {}').format(e))
 
 import grass.script as grass
 from core.utils import _

Modified: grass/branches/releasebranch_7_0/gui/wxpython/tplot/frame.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/tplot/frame.py	2016-02-20 17:15:47 UTC (rev 67908)
+++ grass/branches/releasebranch_7_0/gui/wxpython/tplot/frame.py	2016-02-20 17:16:40 UTC (rev 67909)
@@ -10,7 +10,7 @@
  - frame::TplotFrame
  - frame::LookUp
 
-(C) 2012-2014 by the GRASS Development Team
+(C) 2012-2016 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 for details.
@@ -38,9 +38,9 @@
         NavigationToolbar2WxAgg as NavigationToolbar
     import matplotlib.dates as mdates
     from matplotlib import cbook
-except ImportError:
+except ImportError as e:
     raise ImportError(_('The Temporal Plot Tool needs the "matplotlib" '
-                        '(python-matplotlib) package to be installed.'))
+                        '(python-matplotlib) package to be installed. {}').format(e))
 
 from core.utils import _
 



More information about the grass-commit mailing list