[GRASS-SVN] r35432 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jan 16 05:19:16 EST 2009
Author: martinl
Date: 2009-01-16 05:19:16 -0500 (Fri, 16 Jan 2009)
New Revision: 35432
Modified:
grass/trunk/gui/wxpython/gui_modules/nviz.py
Log:
Fail gracefully when wxnviz is not available
(merge from relbr64, r35430)
Modified: grass/trunk/gui/wxpython/gui_modules/nviz.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/nviz.py 2009-01-16 10:18:21 UTC (rev 35431)
+++ grass/trunk/gui/wxpython/gui_modules/nviz.py 2009-01-16 10:19:16 UTC (rev 35432)
@@ -32,15 +32,16 @@
import globalvar
try:
- sys.path.append(os.path.join(globalvar.ETCWXDIR, "nviz"))
- import grass7_wxnviz as wxnviz
+ import nviz_mapdisp
+ import nviz_tools
haveNviz = True
except ImportError, e:
haveNviz = False
errorMsg = e
-import nviz_mapdisp
-import nviz_tools
-
-GLWindow = nviz_mapdisp.GLWindow
-NvizToolWindow = nviz_tools.NvizToolWindow
+if haveNviz:
+ GLWindow = nviz_mapdisp.GLWindow
+ NvizToolWindow = nviz_tools.NvizToolWindow
+else:
+ GLWindow = None
+ NvizToolWindow = None
More information about the grass-commit
mailing list