summaryrefslogtreecommitdiffstats
path: root/callback_plugins
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2016-12-20 14:54:43 -0500
committerJason DeTiberus <jdetiber@redhat.com>2016-12-20 16:05:49 -0500
commit4cdc771f8e04f88ac47dd194da03dadfa2fdba2d (patch)
tree3e394b3da742faaa0d5d97dd0a74d4efd03c6567 /callback_plugins
parent3e5f3380ccacc654450924fca830b93fda6c7592 (diff)
downloadopenshift-4cdc771f8e04f88ac47dd194da03dadfa2fdba2d.tar.gz
openshift-4cdc771f8e04f88ac47dd194da03dadfa2fdba2d.tar.bz2
openshift-4cdc771f8e04f88ac47dd194da03dadfa2fdba2d.tar.xz
openshift-4cdc771f8e04f88ac47dd194da03dadfa2fdba2d.zip
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