浏览代码

pygrass: disable mdebug decorator

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@63208 15284696-431f-4ddb-bdfa-cd5b030d7da7
Pietro Zambelli 10 年之前
父节点
当前提交
487cad1928
共有 1 个文件被更改,包括 10 次插入9 次删除
  1. 10 9
      lib/python/pygrass/modules/interface/module.py

+ 10 - 9
lib/python/pygrass/modules/interface/module.py

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