diff options
author | Tim Bielawa <tbielawa@redhat.com> | 2016-08-26 08:53:45 -0700 |
---|---|---|
committer | Tim Bielawa <tbielawa@redhat.com> | 2016-08-26 09:07:27 -0700 |
commit | c959f9dcf9f4bc0c3dfeb4e68c082c79d479de35 (patch) | |
tree | 22b2113c38ca597f7658d7a30e7873d37916a207 /utils/src/ooinstall/openshift_ansible.py | |
parent | 577195e3eefe19b95e39f0f52834cd3dc8f77cdf (diff) | |
download | openshift-c959f9dcf9f4bc0c3dfeb4e68c082c79d479de35.tar.gz openshift-c959f9dcf9f4bc0c3dfeb4e68c082c79d479de35.tar.bz2 openshift-c959f9dcf9f4bc0c3dfeb4e68c082c79d479de35.tar.xz openshift-c959f9dcf9f4bc0c3dfeb4e68c082c79d479de35.zip |
Fix PyLint errors discovered when upgrading to newer version
* Fixes PyLint to run in the virtualenv used for all tests
* Replaced 'LooseVersion' with 'parse_version' from setuptools
- This is a work around for the issue in
https://github.com/PyCQA/pylint/issues/73 in which pylint can not
import disutils.version correctly in a virtualenv.
* Removed the unused function 'delete_hosts' which was causing a
pylint error as well
* Removed a deprecated pylint pragma option, 'bad-builtin'
* Fixed some import ordering issues it was picky about
* Added another disable for a case where the PyLint suggestion would
have us altering the container we would be iterating over
* Add code-coverage reports to the unittests with the MINIMUM coverage
percentage for success set to 70%
- Current test coverage is at 76%
Diffstat (limited to 'utils/src/ooinstall/openshift_ansible.py')
-rw-r--r-- | utils/src/ooinstall/openshift_ansible.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/src/ooinstall/openshift_ansible.py b/utils/src/ooinstall/openshift_ansible.py index 001c58d73..4113bb126 100644 --- a/utils/src/ooinstall/openshift_ansible.py +++ b/utils/src/ooinstall/openshift_ansible.py @@ -4,9 +4,10 @@ import socket import subprocess import sys import os +import logging import yaml from ooinstall.variants import find_variant -import logging + installer_log = logging.getLogger('installer') CFG = None @@ -229,7 +230,7 @@ def load_system_facts(inventory_file, os_facts_path, env_vars, verbose=False): os_facts_path]) installer_log.debug("Going to subprocess out to ansible now with these args: %s", ' '.join(args)) status = subprocess.call(args, env=env_vars, stdout=FNULL) - if not status == 0: + if status != 0: installer_log.debug("Exit status from subprocess was not 0") return [], 1 |