From 9a259ef6926049011746d68bdea34404006e8f6a Mon Sep 17 00:00:00 2001 From: Steve Milner Date: Thu, 12 Jan 2017 15:14:05 -0500 Subject: Added setup.py to flake8 tests Added setup.py to flake8 tests since it is code. Also minor updates to slightly modernize. Note: In the future {#} should probably be ported to {} as numbering is no longer needed (and disliked by many). --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 05a23b7bb..c826c167f 100644 --- a/setup.py +++ b/setup.py @@ -17,6 +17,7 @@ from yamllint.config import YamlLintConfig from yamllint.cli import Format from yamllint import linter + def find_files(base_dir, exclude_dirs, include_dirs, file_regex): ''' find files matching file_regex ''' found = [] @@ -111,7 +112,8 @@ class OpenShiftAnsibleYamlLint(Command): if has_errors or has_warnings: print('yammlint issues found') - exit(1) + raise SystemExit(1) + class OpenShiftAnsiblePylint(PylintCommand): ''' Class to override the default behavior of PylintCommand ''' -- cgit v1.2.1