[GRASS-SVN] r62349 - in grass/trunk: . lib/python/pygrass/modules/interface
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Oct 22 04:53:20 PDT 2014
Author: martinl
Date: 2014-10-22 04:53:20 -0700 (Wed, 22 Oct 2014)
New Revision: 62349
Modified:
grass/trunk/
grass/trunk/lib/python/pygrass/modules/interface/module.py
Log:
pygrass: Module.__call__() - print debug message
Property changes on: grass/trunk
___________________________________________________________________
Added: svn:mergeinfo
+ /grass/branches/releasebranch_7_0:62348
Modified: grass/trunk/lib/python/pygrass/modules/interface/module.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/interface/module.py 2014-10-22 11:46:36 UTC (rev 62348)
+++ grass/trunk/lib/python/pygrass/modules/interface/module.py 2014-10-22 11:53:20 UTC (rev 62349)
@@ -19,8 +19,8 @@
from grass.pygrass.modules.interface.flag import Flag
from grass.pygrass.modules.interface.typedict import TypeDict
from grass.pygrass.modules.interface.read import GETFROMTAG, DOC
+from grass.pygrass.messages import Messenger
-
class ParallelModuleQueue(object):
"""This class is designed to run an arbitrary number of pygrass Module
processes in parallel.
@@ -337,6 +337,8 @@
and keyword arguments to the grass module.
"""
def __init__(self, cmd, *args, **kargs):
+ self._msgr = Messenger()
+
if isinstance(cmd, unicode):
self.name = str(cmd)
elif isinstance(cmd, str):
@@ -416,9 +418,12 @@
plus some extra parameters that are: run_, stdin_, stdout_, stderr_,
env_ and finish_.
"""
+ self._msgr.debug(1, "Module.__call__(): %s" % (self.get_bash()))
+
if not args and not kargs:
self.run()
return self
+
#
# check for extra kargs, set attribute and remove from dictionary
#
More information about the grass-commit
mailing list