[GRASS-SVN] r35430 -
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jan 16 05:15:03 EST 2009
Author: martinl
Date: 2009-01-16 05:15:03 -0500 (Fri, 16 Jan 2009)
New Revision: 35430
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz.py
Log:
Fail gracefully when wxnviz is not available
Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz.py 2009-01-16 09:54:25 UTC (rev 35429)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz.py 2009-01-16 10:15:03 UTC (rev 35430)
@@ -39,15 +39,16 @@
import globalvar
try:
- sys.path.append(os.path.join(globalvar.ETCWXDIR, "nviz"))
- import grass6_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