From 7beb6d3845b79201d03928c928b1e8f4b1e34365 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Tue, 21 Feb 2012 10:37:40 +0100 Subject: [PATCH] make sure skip_warning works with no files --- flake8/run.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake8/run.py b/flake8/run.py index 7fd5d48..4a7ddfa 100644 --- a/flake8/run.py +++ b/flake8/run.py @@ -118,6 +118,8 @@ def git_hook(complexity=-1, strict=False): ext = os.path.splitext(filename)[-1] if ext != '.py': continue + if not os.path.exists(filename): + continue warnings += check_file(filename, complexity) if strict: