mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-02 11:22:47 +00:00
now show full callback stacktrace when vvv+
Still is a warning as we don't want to repeat it multiple times nor additional callbacks to stop ansible execution. hopefully we can avoid shipping w/o exceptions in the default/minimal callbacks... Also added feature that now allows for 'preformated' strings passed to warning
This commit is contained in:
@@ -290,8 +290,13 @@ class TaskQueueManager:
|
||||
try:
|
||||
method(*args, **kwargs)
|
||||
except Exception as e:
|
||||
import traceback
|
||||
orig_tb = traceback.format_exc()
|
||||
try:
|
||||
v1_method = method.replace('v2_','')
|
||||
v1_method(*args, **kwargs)
|
||||
except Exception:
|
||||
display.warning('Error when using %s: %s' % (method, str(e)))
|
||||
if display.verbosity >= 3:
|
||||
display.warning(orig_tb, formatted=True)
|
||||
else:
|
||||
display.warning('Error when using %s: %s' % (method, str(e)))
|
||||
|
||||
Reference in New Issue
Block a user