diff --git a/pre_commit_hooks/detect_aws_credentials.py b/pre_commit_hooks/detect_aws_credentials.py index 96ec49b..dd459c4 100644 --- a/pre_commit_hooks/detect_aws_credentials.py +++ b/pre_commit_hooks/detect_aws_credentials.py @@ -79,7 +79,7 @@ def check_file_for_aws_keys(filenames, keys): for filename in filenames: with io.open(filename, 'rb') as content: binary_body = content.read() - text_body = binary_body.decode(error='ignore') + text_body = binary_body.decode(errors='ignore') for key in keys: # naively match the entire file, low chance of incorrect # collision