From f4912dd88a08764c2f264290a7a08cec8ca12a12 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 28 Oct 2015 19:10:41 -0400 Subject: [PATCH] added callback fallback to v1 methods for backwards compat with existing callbacks --- lib/ansible/executor/task_queue_manager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ansible/executor/task_queue_manager.py b/lib/ansible/executor/task_queue_manager.py index 3dd8ff0da4..63cf5d2921 100644 --- a/lib/ansible/executor/task_queue_manager.py +++ b/lib/ansible/executor/task_queue_manager.py @@ -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)))