1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #12956 from bcoca/v1_callbacks

added callback fallback to v1 methods
This commit is contained in:
Brian Coca 2015-11-05 13:13:02 -05:00
commit f68f7d0495

View file

@ -279,4 +279,8 @@ class TaskQueueManager:
try:
method(*args, **kwargs)
except Exception as e:
self._display.warning('Error when using %s: %s' % (method, str(e)))
try:
v1_method = method.replace('v2_','')
v1_method(*args, **kwargs)
except Exception:
self._display.warning('Error when using %s: %s' % (method, str(e)))