From 4e2cf62e89d1313563036f3fb07cc30143d9584f Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Mon, 16 Oct 2017 10:29:41 -0400 Subject: [PATCH] fixes ansible callback import json warning [WARNING]: Failure using method (v2_runner_on_ok) in callback plugin (): 'module' object has no attribute 'dumps' The above error is thrown by ansible if callback plugins don't respect the same import precedence configuration as Ansible. ansible callback/* dir includes a json.py file. This is imported by ansible callback/__init__.py when a callback plugin implementation imports from Ansible callback base without setting the correct import precedence. --- awx/lib/tests/test_display_callback.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/awx/lib/tests/test_display_callback.py b/awx/lib/tests/test_display_callback.py index 1607544827..f356b32d42 100644 --- a/awx/lib/tests/test_display_callback.py +++ b/awx/lib/tests/test_display_callback.py @@ -1,3 +1,8 @@ +# Copyright (c) 2017 Ansible by Red Hat +# All Rights Reserved + +from __future__ import absolute_import + from collections import OrderedDict import json import mock