From 29b74f9b37a6efd61800487f2ef1c5432e0264a4 Mon Sep 17 00:00:00 2001 From: Florent Xicluna Date: Wed, 13 Feb 2013 21:26:28 +0100 Subject: [PATCH] Wrong exit code for the VCS hooks --- flake8/hooks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake8/hooks.py b/flake8/hooks.py index cd3e126..68df056 100644 --- a/flake8/hooks.py +++ b/flake8/hooks.py @@ -25,7 +25,7 @@ def git_hook(complexity=-1, strict=False, ignore=None, lazy=False): report = flake8_style.check_files(files_modified) if strict: - return report.get_file_results() + return report.total_errors return 0 @@ -46,7 +46,7 @@ def hg_hook(ui, repo, **kwargs): strict = ui.configbool('flake8', 'strict', default=True) if strict: - return report.get_file_results() + return report.total_errors return 0