From 2e37c702c8d4c3778d172d8e886f68e23d4aeebc Mon Sep 17 00:00:00 2001 From: Jason DeTiberus Date: Thu, 9 Mar 2017 12:38:36 -0500 Subject: Use six from ansible.module_utils for remote hosts --- roles/openshift_health_checker/openshift_checks/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'roles/openshift_health_checker') diff --git a/roles/openshift_health_checker/openshift_checks/__init__.py b/roles/openshift_health_checker/openshift_checks/__init__.py index 2c70438c9..b410574a6 100644 --- a/roles/openshift_health_checker/openshift_checks/__init__.py +++ b/roles/openshift_health_checker/openshift_checks/__init__.py @@ -7,8 +7,7 @@ from abc import ABCMeta, abstractmethod, abstractproperty from importlib import import_module import operator -import six -from six.moves import reduce +from ansible.module_utils.six.moves import add_metaclass, reduce class OpenShiftCheckException(Exception): @@ -16,7 +15,7 @@ class OpenShiftCheckException(Exception): pass -@six.add_metaclass(ABCMeta) +@add_metaclass(ABCMeta) class OpenShiftCheck(object): """A base class for defining checks for an OpenShift cluster environment.""" -- cgit v1.2.3 From 1100f5a76dff38a1f191f7b3ae42ec13bfc3c43e Mon Sep 17 00:00:00 2001 From: Jason DeTiberus Date: Thu, 9 Mar 2017 13:50:33 -0500 Subject: Use ansible.compat.six where possible --- roles/openshift_health_checker/openshift_checks/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'roles/openshift_health_checker') diff --git a/roles/openshift_health_checker/openshift_checks/__init__.py b/roles/openshift_health_checker/openshift_checks/__init__.py index b410574a6..50f26765b 100644 --- a/roles/openshift_health_checker/openshift_checks/__init__.py +++ b/roles/openshift_health_checker/openshift_checks/__init__.py @@ -2,12 +2,15 @@ Health checks for OpenShift clusters. """ +import operator import os + from abc import ABCMeta, abstractmethod, abstractproperty from importlib import import_module -import operator -from ansible.module_utils.six.moves import add_metaclass, reduce +# pylint import-error disabled because pylint cannot find the package +# when installed in a virtualenv +from ansible.module_utils.six.moves import add_metaclass, reduce # pylint: disable=import-error, redefined-builtin class OpenShiftCheckException(Exception): -- cgit v1.2.3