diff options
Diffstat (limited to 'src/software/lmi/software/yumdb/__init__.py')
-rw-r--r-- | src/software/lmi/software/yumdb/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/software/lmi/software/yumdb/__init__.py b/src/software/lmi/software/yumdb/__init__.py index 705ec9c..4c5364e 100644 --- a/src/software/lmi/software/yumdb/__init__.py +++ b/src/software/lmi/software/yumdb/__init__.py @@ -71,6 +71,9 @@ def job_request(async=False): Job objects are processed by this decorator for caller to obtain only the information he needs. + If async == True, the wrapped method must have 'async' argument in + its **kwargs. + It wrapps them with logger wrapper and in case of asynchronous jobs, it returns just the jobid. """ @@ -94,9 +97,8 @@ def job_request(async=False): @wraps(method) def _new_func(self, *args, **kwargs): """Wrapper for YumDB's method.""" - callargs = inspect.getcallargs(method, self, *args, **kwargs) result = logged(self, *args, **kwargs) - if callargs.get('async', False): + if kwargs.get('async', False): return result else: return result.result_data |