Do not use len() in log_exec decorator
It is not necessary to use the len method here. Change-Id: If938d130250327d5b10eb3303d2a2fa3b928c414
This commit is contained in:
parent
15a5ad3929
commit
fadc8e39e7
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user