From 28723859b15ffa88441407ec1985ef2104a0aa1b Mon Sep 17 00:00:00 2001 From: Michal Minar Date: Fri, 26 Jul 2013 14:19:10 +0200 Subject: software: fixed logging decorator do not expect, that decorated function takes any argument --- src/software/lmi/software/util/cmpi_logging.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/software/lmi/software/util/cmpi_logging.py b/src/software/lmi/software/util/cmpi_logging.py index b3a76c4..14802c5 100644 --- a/src/software/lmi/software/util/cmpi_logging.py +++ b/src/software/lmi/software/util/cmpi_logging.py @@ -160,7 +160,7 @@ def trace_function_or_method(is_method=False, frame_level=1): classname = inspect.getouterframes( inspect.currentframe())[frame_level][3] - def _wrapper(self, *args, **kwargs): + def _wrapper(*args, **kwargs): """ Wrapper for function or method, that does the logging. """ @@ -188,7 +188,7 @@ def trace_function_or_method(is_method=False, frame_level=1): logger.debug("%(caller_file)s:%(caller_lineno)d - %(action)s" " %(module)s:%(func)s:%(lineno)d%(args)s" , logargs) try: - result = func(self, *args, **kwargs) + result = func(*args, **kwargs) if logger.isEnabledFor(logging.DEBUG): logargs["action"] = "exiting" logger.debug("%(caller_file)s:%(caller_lineno)d" -- cgit