From 651f2ffbc929a9984d2f1cc24a052f83444d27f1 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 4 May 2018 15:50:05 +0200 Subject: [PATCH] Return proper exit value if test failed Return 1 then. Contributes to issue CURA-5330. --- run_mypy.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/run_mypy.py b/run_mypy.py index 88adea8db9..a72c555b8a 100644 --- a/run_mypy.py +++ b/run_mypy.py @@ -46,14 +46,9 @@ def main(): print("------------- Checking module {mod}".format(**locals())) result = subprocess.run([sys.executable, mypyModule, "-p", mod]) if result.returncode != 0: - print(""" - Module {mod} failed checking. :( - """.format(**locals())) - break + print("\nModule {mod} failed checking. :(".format(**locals())) + return 1 else: - print(""" - - Done checking. All is good. - """) + print("\n\nDone checking. All is good.") return 0 sys.exit(main())