mirror of
https://github.com/openshift/openshift-ansible.git
synced 2026-02-05 15:45:57 +01:00
Correct return code compairison for yamllint
This commit is contained in:
10
setup.py
10
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 '''
|
||||
|
||||
Reference in New Issue
Block a user