summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-01-12 15:26:01 -0500
committerGitHub <noreply@github.com>2017-01-12 15:26:01 -0500
commit0b8211cdea639c0f9fdc0d8ba9a9954e2179388f (patch)
treee49cb49418c07ffad46ab1812032f66cb54cacab
parentf03d2d42a2b419e9f3cbd3eeb17107e8b76f9a8f (diff)
parent9a259ef6926049011746d68bdea34404006e8f6a (diff)
downloadopenshift-0b8211cdea639c0f9fdc0d8ba9a9954e2179388f.tar.gz
openshift-0b8211cdea639c0f9fdc0d8ba9a9954e2179388f.tar.bz2
openshift-0b8211cdea639c0f9fdc0d8ba9a9954e2179388f.tar.xz
openshift-0b8211cdea639c0f9fdc0d8ba9a9954e2179388f.zip
Merge pull request #3087 from ashcrow/setuppy
Added setup.py to flake8 tests
-rw-r--r--setup.cfg2
-rw-r--r--setup.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/setup.cfg b/setup.cfg
index d55df9d37..06346852c 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -22,6 +22,6 @@ excludes=.tox,utils,files
lint_disable=fixme,locally-disabled,file-ignored,duplicate-code
[flake8]
-exclude=.tox/*,setup.py,utils/*,inventory/*
+exclude=.tox/*,utils/*,inventory/*
max_line_length = 120
ignore = E501,T003
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 '''