diff options
author | Russell Teague <rteague@redhat.com> | 2017-01-11 14:31:56 -0500 |
---|---|---|
committer | Russell Teague <rteague@redhat.com> | 2017-01-11 14:31:56 -0500 |
commit | 4e56e14c41dc9054dcbb01f3965b175dc64d9388 (patch) | |
tree | a65a92545b3d9d5a9df0175b956f966b5fd18247 /setup.py | |
parent | f443452d1a999df7417e665533494cebb44c0e7a (diff) | |
download | openshift-4e56e14c41dc9054dcbb01f3965b175dc64d9388.tar.gz openshift-4e56e14c41dc9054dcbb01f3965b175dc64d9388.tar.bz2 openshift-4e56e14c41dc9054dcbb01f3965b175dc64d9388.tar.xz openshift-4e56e14c41dc9054dcbb01f3965b175dc64d9388.zip |
Correct return code compairison for yamllint
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 ''' |