Просмотр исходного кода

wxGUI: print more detailed error message in case of matplotlib failure

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@67908 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 9 лет назад
Родитель
Сommit
1e957e1aee
3 измененных файлов с 12 добавлено и 10 удалено
  1. 5 4
      gui/wxpython/iscatt/plots.py
  2. 4 3
      gui/wxpython/timeline/frame.py
  3. 3 3
      gui/wxpython/tplot/frame.py

+ 5 - 4
gui/wxpython/iscatt/plots.py

@@ -1,14 +1,14 @@
 """
 @package iscatt.plots
 
-@brief Ploting widgets.
+@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 @@ try:
     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

+ 4 - 3
gui/wxpython/timeline/frame.py

@@ -8,7 +8,7 @@ Classes:
  - 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 @@ try:
         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 _

+ 3 - 3
gui/wxpython/tplot/frame.py

@@ -10,7 +10,7 @@ Classes:
  - 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 @@ try:
         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 _