Apply defaults to all of the configs. Much fewer .get()s

This commit is contained in:
Anthony Sottile 2014-03-31 23:22:13 -07:00
parent b23ad5d6a3
commit ac67af21ec
13 changed files with 73 additions and 48 deletions

View file

@ -38,7 +38,7 @@ def _run_single_hook(runner, repository, hook_id, all_files=False):
get_filenames(hook['files']),
)
if retcode != repository.hooks[hook_id].get('expected_return_value', 0):
if retcode != repository.hooks[hook_id]['expected_return_value']:
output = '\n'.join([stdout, stderr]).strip()
retcode = 1
color = RED