[GRASS-SVN] r35431 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jan 16 05:18:21 EST 2009


Author: martinl
Date: 2009-01-16 05:18:21 -0500 (Fri, 16 Jan 2009)
New Revision: 35431

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz.py
Log:
Fail gracefully when wxnviz is not available
     (merge from relbr64, r35430)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz.py	2009-01-16 10:15:03 UTC (rev 35430)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz.py	2009-01-16 10:18:21 UTC (rev 35431)
@@ -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