[GRASS-SVN] r58702 - in grass/trunk/gui/wxpython: gui_core wxplot
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 13 09:12:29 PST 2014
Author: martinl
Date: 2014-01-13 09:12:29 -0800 (Mon, 13 Jan 2014)
New Revision: 58702
Modified:
grass/trunk/gui/wxpython/gui_core/gselect.py
grass/trunk/gui/wxpython/wxplot/base.py
grass/trunk/gui/wxpython/wxplot/histogram.py
grass/trunk/gui/wxpython/wxplot/profile.py
grass/trunk/gui/wxpython/wxplot/scatter.py
Log:
wxGUI: do not crash when numpy is missing
Modified: grass/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py 2014-01-13 13:12:05 UTC (rev 58701)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py 2014-01-13 17:12:29 UTC (rev 58702)
@@ -51,7 +51,11 @@
import grass.script as grass
from grass.script import task as gtask
-from grass.pygrass import messages
+try:
+ from grass.pygrass import messages
+except ImportError, e:
+ print >> sys.stderr, _("Unable to import pyGRASS: %s\n"
+ "Some functionality will be not accessible") % e
import grass.temporal as tgis
from gui_core.widgets import ManageSettingsWidget
Modified: grass/trunk/gui/wxpython/wxplot/base.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/base.py 2014-01-13 13:12:05 UTC (rev 58701)
+++ grass/trunk/gui/wxpython/wxplot/base.py 2014-01-13 17:12:29 UTC (rev 58702)
@@ -19,7 +19,10 @@
import sys
import wx
-import wx.lib.plot as plot
+try:
+ import wx.lib.plot as plot
+except ImportError, e:
+ print >> sys.stderr, e
from core.globalvar import ETCICONDIR
from core.settings import UserSettings
Modified: grass/trunk/gui/wxpython/wxplot/histogram.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/histogram.py 2014-01-13 13:12:05 UTC (rev 58701)
+++ grass/trunk/gui/wxpython/wxplot/histogram.py 2014-01-13 17:12:29 UTC (rev 58702)
@@ -18,7 +18,10 @@
import sys
import wx
-import wx.lib.plot as plot
+try:
+ import wx.lib.plot as plot
+except ImportError, e:
+ print >> sys.stderr, e
import grass.script as grass
Modified: grass/trunk/gui/wxpython/wxplot/profile.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/profile.py 2014-01-13 13:12:05 UTC (rev 58701)
+++ grass/trunk/gui/wxpython/wxplot/profile.py 2014-01-13 17:12:29 UTC (rev 58702)
@@ -20,7 +20,10 @@
import math
import wx
-import wx.lib.plot as plot
+try:
+ import wx.lib.plot as plot
+except ImportError, e:
+ print >> sys.stderr, e
import grass.script as grass
from core.utils import _
Modified: grass/trunk/gui/wxpython/wxplot/scatter.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/scatter.py 2014-01-13 13:12:05 UTC (rev 58701)
+++ grass/trunk/gui/wxpython/wxplot/scatter.py 2014-01-13 17:12:29 UTC (rev 58702)
@@ -18,7 +18,10 @@
import sys
import wx
-import wx.lib.plot as plot
+try:
+ import wx.lib.plot as plot
+except ImportError, e:
+ print >> sys.stderr, e
import grass.script as grass
More information about the grass-commit
mailing list