From 2ee518c20f76ac394fed7050894b737dc2af3e0c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 30 Jan 2014 20:49:08 +0100 Subject: [PATCH] Add exit status to run_checks --- run_checks.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/run_checks.py b/run_checks.py index eba9a4d60..64f929ab9 100644 --- a/run_checks.py +++ b/run_checks.py @@ -85,6 +85,7 @@ flake8_disable = [ run('pylint', ['--ignore=appdirs.py', '--output-format=colorized', '--reports=no', '--disable=' + ','.join(pylint_disable)]) +# FIXME what the hell is the flake8 exit status? run('flake8', ['--max-complexity=10', '--exclude=appdirs.py', '--ignore=' + ''.join(flake8_disable)]) check_crlf() @@ -92,3 +93,8 @@ check_crlf() print('Exit status values:') for (k, v) in status.items(): print(' {} - {}'.format(k, v)) + +if all([val in [True, 0] for val in status]): + sys.exit(0) +else: + sys.exit(1)