Merge "Do not use len() in log_exec decorator"

This commit is contained in:
Jenkins 2015-11-11 03:59:10 +00:00 committed by Gerrit Code Review
commit 2d09b1575f

View File

@ -101,7 +101,7 @@ def log_exec(logger, level=logging.DEBUG):
def _decorator(func):
def _logged(*args, **kw):
params_repr = ("[args=%s, kw=%s]" % (str(args), str(kw))
if len(args) > 0 or len(kw) > 0 else "")
if args or kw else "")
func_repr = ("Called method [name=%s, doc='%s', params=%s]" %
(func.__name__, func.__doc__, params_repr))