summaryrefslogtreecommitdiffstats
path: root/callback_plugins
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-12-21 13:06:27 -0500
committerGitHub <noreply@github.com>2016-12-21 13:06:27 -0500
commit4c20c6b76f295dc83e2ce730238b7753724e7e53 (patch)
tree4e6ff6855c6e5343e97d0864f47cb2088fe364f9 /callback_plugins
parent3e5f3380ccacc654450924fca830b93fda6c7592 (diff)
parent7d02b608de839cb57e2071e9d55052957c13aae3 (diff)
downloadopenshift-4c20c6b76f295dc83e2ce730238b7753724e7e53.tar.gz
openshift-4c20c6b76f295dc83e2ce730238b7753724e7e53.tar.bz2
openshift-4c20c6b76f295dc83e2ce730238b7753724e7e53.tar.xz
openshift-4c20c6b76f295dc83e2ce730238b7753724e7e53.zip
Merge pull request #3001 from detiber/python3
python3 support, add tox for better local testing against multiple python versions
Diffstat (limited to 'callback_plugins')
-rw-r--r--callback_plugins/openshift_quick_installer.py21
1 files changed, 2 insertions, 19 deletions
diff --git a/callback_plugins/openshift_quick_installer.py b/callback_plugins/openshift_quick_installer.py
index fc9bfb899..f5c4c71a4 100644
--- a/callback_plugins/openshift_quick_installer.py
+++ b/callback_plugins/openshift_quick_installer.py
@@ -36,30 +36,13 @@ What's different:
"""
from __future__ import (absolute_import, print_function)
-import imp
-import os
import sys
from ansible import constants as C
+from ansible.plugins.callback import CallbackBase
from ansible.utils.color import colorize, hostcolor
-ANSIBLE_PATH = imp.find_module('ansible')[1]
-DEFAULT_PATH = os.path.join(ANSIBLE_PATH, 'plugins/callback/default.py')
-DEFAULT_MODULE = imp.load_source(
- 'ansible.plugins.callback.default',
- DEFAULT_PATH
-)
-try:
- from ansible.plugins.callback import CallbackBase
- BASECLASS = CallbackBase
-except ImportError: # < ansible 2.1
- BASECLASS = DEFAULT_MODULE.CallbackModule
-
-reload(sys)
-sys.setdefaultencoding('utf-8')
-
-
-class CallbackModule(DEFAULT_MODULE.CallbackModule):
+class CallbackModule(CallbackBase):
"""
Ansible callback plugin