[GRASS-SVN] r53555 - grass/branches/releasebranch_6_4/gui/wxpython/core

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Oct 26 02:45:28 PDT 2012


Author: martinl
Date: 2012-10-26 02:45:27 -0700 (Fri, 26 Oct 2012)
New Revision: 53555

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/core/debug.py
Log:
attempt to fix compilation issue (menustrings.py)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/core/debug.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/core/debug.py	2012-10-25 15:22:27 UTC (rev 53554)
+++ grass/branches/releasebranch_6_4/gui/wxpython/core/debug.py	2012-10-26 09:45:27 UTC (rev 53555)
@@ -11,7 +11,7 @@
 Debug.msg (3, 'debug message')
 @endcode
          
-(C) 2007-2009, 2011 by the GRASS Development Team
+(C) 2007-2009, 2011-2012 by the GRASS Development Team
 
 This program is free software under the GNU General Public License
 (>=v2). Read the file COPYING that comes with GRASS for details.
@@ -22,8 +22,6 @@
 import os
 import sys
 
-import grass.script as grass
-
 class DebugMsg:
     """!wxGUI debugging
 
@@ -32,14 +30,17 @@
     @endcode
     """
     def __init__(self):
-        # default level
-        self.debuglevel = 0
-        
-        self.SetLevel()
+        self.SetLevel() # -> default debug level
 
     def SetLevel(self):
         """!Initialize gui debug level
         """
+        try:
+            import grass.script as grass
+        except ImportError:
+            self.debuglevel = 0
+            return
+        
         self.debuglevel = int(grass.gisenv().get('WX_DEBUG', 0))
         
     def msg(self, level, message, *args):



More information about the grass-commit mailing list