[GRASS-SVN] r49409 - grass/branches/releasebranch_6_4/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Nov 28 13:58:14 EST 2011


Author: martinl
Date: 2011-11-28 10:58:14 -0800 (Mon, 28 Nov 2011)
New Revision: 49409

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz.py
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz_mapdisp.py
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz_tools.py
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/workspace.py
Log:
wxGUI: fix disable wxNviz (catch also NameError)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz.py	2011-11-28 16:02:41 UTC (rev 49408)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz.py	2011-11-28 18:58:14 UTC (rev 49409)
@@ -25,14 +25,14 @@
 import wx
 import globalvar
 try:
-    from wx import glcanvas
-    import nviz_mapdisp
-    import nviz_tools
-    import wxnviz
+    # from wx import glcanvas
     # disable wxNviz for 6.4.2
     # TODO: backport wxNviz from devbr6 *after* releasing 6.4.2
+    # import nviz_mapdisp
+    # import nviz_tools
+    # import wxnviz
     haveNviz = False
-except ImportError, err:
+except (ImportError, NameError), err:
     haveNviz = False
     errorMsg = err
 

Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz_mapdisp.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz_mapdisp.py	2011-11-28 16:02:41 UTC (rev 49408)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz_mapdisp.py	2011-11-28 18:58:14 UTC (rev 49409)
@@ -38,7 +38,10 @@
 from preferences    import globalSettings as UserSettings
 from workspace      import Nviz as NvizDefault
 
-import wxnviz
+try:
+    import wxnviz
+except (ImportError, NameError):
+    pass
 
 wxUpdateProperties, EVT_UPDATE_PROP  = NewEvent()
 wxUpdateView,       EVT_UPDATE_VIEW  = NewEvent()

Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz_tools.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz_tools.py	2011-11-28 16:02:41 UTC (rev 49408)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz_tools.py	2011-11-28 18:58:14 UTC (rev 49409)
@@ -42,7 +42,7 @@
 try:
     from nviz_mapdisp import wxUpdateView, wxUpdateLight, wxUpdateProperties
     import wxnviz
-except ImportError:
+except (ImportError, NameError):
     pass
 from debug import Debug
 

Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/workspace.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/workspace.py	2011-11-28 16:02:41 UTC (rev 49408)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/workspace.py	2011-11-28 18:58:14 UTC (rev 49409)
@@ -38,7 +38,7 @@
 
 try:
     import wxnviz
-except ImportError:
+except (ImportError, NameError):
     wxnviz = None
 
 class ProcessWorkspaceFile:



More information about the grass-commit mailing list