now default shows time taken when -vv or above

This commit is contained in:
Brian Coca 2015-07-11 00:02:40 -04:00
parent 7a1bce1b5d
commit fdea00880b

View file

@ -70,6 +70,8 @@ class CallbackModule(CallbackBase):
if 'verbose_always' in result._result: if 'verbose_always' in result._result:
indent = 4 indent = 4
del result._result['verbose_always'] del result._result['verbose_always']
if self._display.verbosity >= 2 and 'delta' in result._result:
msg += " [time: %s]" % (result._result['delta'])
msg += " => %s" % json.dumps(result._result, indent=indent, ensure_ascii=False) msg += " => %s" % json.dumps(result._result, indent=indent, ensure_ascii=False)
self._display.display(msg, color=color) self._display.display(msg, color=color)