summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/flake8/main/setuptools_command.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/flake8/main/setuptools_command.py b/src/flake8/main/setuptools_command.py
index f6bd7a8..ba5a260 100644
--- a/src/flake8/main/setuptools_command.py
+++ b/src/flake8/main/setuptools_command.py
@@ -94,4 +94,10 @@ class Flake8(setuptools.Command):
self.flake8.report_statistics()
self.flake8.report_benchmarks()
self.flake8.formatter.stop()
- self.flake8.exit()
+ try:
+ self.flake8.exit()
+ except SystemExit as e:
+ # Cause system exit only if exit code is not zero (terminates
+ # other possibly remaining/pending setuptools commands).
+ if e.code:
+ raise