[GRASS-SVN] r63208 - grass/trunk/lib/python/pygrass/modules/interface

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Nov 27 08:20:32 PST 2014


Author: zarch
Date: 2014-11-27 08:20:32 -0800 (Thu, 27 Nov 2014)
New Revision: 63208

Modified:
   grass/trunk/lib/python/pygrass/modules/interface/module.py
Log:
pygrass: disable mdebug decorator

Modified: grass/trunk/lib/python/pygrass/modules/interface/module.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/interface/module.py	2014-11-27 16:18:48 UTC (rev 63207)
+++ grass/trunk/lib/python/pygrass/modules/interface/module.py	2014-11-27 16:20:32 UTC (rev 63208)
@@ -67,7 +67,7 @@
     number of parallel processes it will wait for all processes to finish,
     sets the stdout and stderr of the Module object and removes it
     from the queue when its finished.
-    
+
     To finish the queue before the maximum number of parallel
     processes was reached call wait() .
 
@@ -77,13 +77,13 @@
     Usage:
 
     Check with a queue size of 3 and 5 processes
-    
+
     >>> import copy
     >>> from grass.pygrass.modules import Module, ParallelModuleQueue
     >>> mapcalc_list = []
-    
+
     Setting run_ to False is important, otherwise a parallel processing is not possible
-    
+
     >>> mapcalc = Module("r.mapcalc", overwrite=True, run_=False)
     >>> queue = ParallelModuleQueue(nprocs=3)
     >>> for i in xrange(5):
@@ -105,7 +105,7 @@
     0
 
     Check with a queue size of 8 and 5 processes
-    
+
     >>> queue = ParallelModuleQueue(nprocs=8)
     >>> mapcalc_list = []
     >>> for i in xrange(5):
@@ -127,7 +127,7 @@
     0
 
     Check with a queue size of 8 and 4 processes
-    
+
     >>> queue = ParallelModuleQueue(nprocs=8)
     >>> mapcalc_list = []
     >>> new_mapcalc = copy.deepcopy(mapcalc)
@@ -257,11 +257,11 @@
 
         :returns: the number fo Module processes running/finished in the queue
         """
-        return self._proc_count 
+        return self._proc_count
 
     def get_max_num_procs(self):
         """Return the maximum number of parallel Module processes
-        
+
         :returns: the maximum number of parallel Module processes
         """
         return self._num_procs
@@ -697,7 +697,7 @@
                 args.append(str(self.flags[flg]))
         return args
 
-    @mdebug(1, extra=_get_bash)
+    # @mdebug(1, extra=_get_bash)
     def run(self):
         """Run the module
 
@@ -711,6 +711,7 @@
         termination. The handling of stdout and stderr must then be done
         outside of this function.
         """
+        get_msgr().debug(1, self.get_bash())
         if self.inputs['stdin'].value:
             self.stdin = self.inputs['stdin'].value
             self.stdin_ = PIPE



More information about the grass-commit mailing list