[GRASS-SVN] r65289 - grass/trunk/lib/python/pygrass/modules/interface
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed May 20 01:12:13 PDT 2015
Author: zarch
Date: 2015-05-20 01:12:13 -0700 (Wed, 20 May 2015)
New Revision: 65289
Modified:
grass/trunk/lib/python/pygrass/modules/interface/module.py
Log:
pygrass: Remove unused code: mdebug decorator
Modified: grass/trunk/lib/python/pygrass/modules/interface/module.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/interface/module.py 2015-05-19 19:17:22 UTC (rev 65288)
+++ grass/trunk/lib/python/pygrass/modules/interface/module.py 2015-05-20 08:12:13 UTC (rev 65289)
@@ -23,37 +23,6 @@
from grass.pygrass.messages import get_msgr
-def mdebug(level, msg='', extra=None):
- """Debug decorators for class methods.
-
- :param level: the debug level
- :type level: int
- :param msg: Debug message
- :type msg: str
- :param extra: Function that return a string
- :type msg: func
- """
- msgr = get_msgr()
-
- def decorator(method):
-
- @wraps(method)
- def wrapper(self, *args, **kargs):
- sargs = ', ' + ' , '.join([repr(a) for a in args]) if args else ''
- skargs = (' , '.join(['%s=%r' % (k, v) for k, v in kargs.items()])
- if kargs else '')
- opts = "%s%s%s" % (sargs, ',' if sargs and skargs else '', skargs)
- dmsg = "%s.%s(self%s): %s %s" % (self.__class__.__name__,
- method.__name__,
- opts, msg,
- extra(self, *args, **kargs)
- if extra else '')
- msgr.debug(level, dmsg)
- return method(self, *args, **kargs)
- return wrapper
- return decorator
-
-
def _get_bash(self, *args, **kargs):
return self.get_bash()
@@ -697,7 +666,6 @@
args.append(str(self.flags[flg]))
return args
- # @mdebug(1, extra=_get_bash)
def run(self):
"""Run the module
More information about the grass-commit
mailing list