Sfoglia il codice sorgente

debug level for grass.debug()

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@36949 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 16 anni fa
parent
commit
5685c409f8
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      lib/python/grass.py

+ 3 - 3
lib/python/grass.py

@@ -135,10 +135,10 @@ def message(msg, flag = None):
     """Display a message using g.message"""
     run_command("g.message", flags = flag, message = msg)
 
-def debug(msg):
+def debug(msg, debug = 1):
     """Display a debugging message using g.message -d"""
-    message(msg, flag = 'd')
-
+    run_command("g.message", flags = 'd', message = msg, debug = debug)
+    
 def verbose(msg):
     """Display a verbose message using g.message -v"""
     message(msg, flag = 'v')