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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jun 1 17:57:49 EDT 2010


Author: martinl
Date: 2010-06-01 17:57:49 -0400 (Tue, 01 Jun 2010)
New Revision: 42432

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/wxnviz.py
Log:
wxGUI: don't fail on missing grass.lib
(merge r42430 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/wxnviz.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/wxnviz.py	2010-06-01 21:55:36 UTC (rev 42431)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/wxnviz.py	2010-06-01 21:57:49 UTC (rev 42432)
@@ -18,12 +18,17 @@
 @author Pythonized by Glynn Clements
 """
 
+import sys
 from threading import Thread
 
 from ctypes import *
-from grass.lib.grass import *
-from grass.lib.ogsf  import *
-from grass.lib.nviz  import *
+try:
+    from grass.lib.grass import *
+    from grass.lib.ogsf  import *
+    from grass.lib.nviz  import *
+except ImportError, e:
+    print >> sys.stderr, "\nWARNING: Nviz extension (3D view mode) disabled. Reason: %s" % e
+    sys.stderr.flush()
 
 from debug import Debug
 



More information about the grass-commit mailing list