[GRASS-SVN] r55049 - grass/trunk/lib/python/pygrass

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Feb 14 07:00:26 PST 2013


Author: lucadelu
Date: 2013-02-14 07:00:25 -0800 (Thu, 14 Feb 2013)
New Revision: 55049

Modified:
   grass/trunk/lib/python/pygrass/functions.py
Log:
add quiet to copy, rename, remove function to suppress messeges

Modified: grass/trunk/lib/python/pygrass/functions.py
===================================================================
--- grass/trunk/lib/python/pygrass/functions.py	2013-02-14 14:57:11 UTC (rev 55048)
+++ grass/trunk/lib/python/pygrass/functions.py	2013-02-14 15:00:25 UTC (rev 55049)
@@ -30,12 +30,13 @@
 
 def remove(oldname, maptype):
     """Remove a map"""
-    grasscore.run_command('g.remove', **{maptype: '{old}'.format(old=oldname)})
+    grasscore.run_command('g.remove', quiet=True,
+                          **{maptype: '{old}'.format(old=oldname)})
 
 
 def rename(oldname, newname, maptype):
     """Rename a map"""
-    grasscore.run_command('g.rename',
+    grasscore.run_command('g.rename', quiet=True,
                           **{maptype: '{old},{new}'.format(old=oldname,
                                                            new=newname), })
 
@@ -48,7 +49,7 @@
     >>> remove('mynewcensus', 'vect')
 
     """
-    grasscore.run_command('g.copy',
+    grasscore.run_command('g.copy', quiet=True,
                           **{maptype: '{old},{new}'.format(old=existingmap,
                                                            new=newmap), })
 



More information about the grass-commit mailing list