validate: pre commit hook: Do not try to run pep8 on non python files!

This commit is contained in:
Thibault Saunier 2014-11-25 15:30:42 +01:00
parent 62bf27f5e3
commit 1753afbe8d

View file

@ -55,6 +55,8 @@ def main():
for modified_file in modified_files:
try:
if not modified_file.endswith(".py"):
continue
pep8_errors = system('pep8', '--repeat', '--ignore', 'E501,E128', modified_file)
if pep8_errors:
if output_message is None: