summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason DeTiberus <detiber@gmail.com>2017-01-11 14:43:27 -0500
committerGitHub <noreply@github.com>2017-01-11 14:43:27 -0500
commite5b73b8461eeb27c66f8b7d62ac527c5a6795c61 (patch)
treeaaea7da62cf238adc208d1101a7cbd221fc5694f
parentee3338b15dbe73a4150b36931116cea27ee188f1 (diff)
parent4e56e14c41dc9054dcbb01f3965b175dc64d9388 (diff)
downloadopenshift-e5b73b8461eeb27c66f8b7d62ac527c5a6795c61.tar.gz
openshift-e5b73b8461eeb27c66f8b7d62ac527c5a6795c61.tar.bz2
openshift-e5b73b8461eeb27c66f8b7d62ac527c5a6795c61.tar.xz
openshift-e5b73b8461eeb27c66f8b7d62ac527c5a6795c61.zip
Merge pull request #3075 from mtnbikenc/fix-yamllint-check
[WIP] Correct return code compairison for yamllint
-rw-r--r--setup.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/setup.py b/setup.py
index e598c3502..05a23b7bb 100644
--- a/setup.py
+++ b/setup.py
@@ -104,14 +104,14 @@ class OpenShiftAnsibleYamlLint(Command):
first = False
print(format_method(problem, yaml_file))
- if problem.level == linter.PROBLEM_LEVELS['error']:
+ if problem.level == linter.PROBLEM_LEVELS[2]:
has_errors = True
- elif problem.level == linter.PROBLEM_LEVELS['warning']:
+ elif problem.level == linter.PROBLEM_LEVELS[1]:
has_warnings = True
- assert not has_errors, 'yamllint errors found'
- assert not has_warnings, 'yamllint warnings found'
-
+ if has_errors or has_warnings:
+ print('yammlint issues found')
+ exit(1)
class OpenShiftAnsiblePylint(PylintCommand):
''' Class to override the default behavior of PylintCommand '''