mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 19:46:54 +00:00
trying to fix python-version issue
This commit is contained in:
parent
c13d0037a4
commit
352113d195
1 changed files with 3 additions and 2 deletions
|
|
@ -76,8 +76,9 @@ def check_file_for_aws_keys(filenames, keys):
|
||||||
bad_files = []
|
bad_files = []
|
||||||
|
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
with open(filename, 'r', errors='ignore') as content:
|
with io.open(filename, 'rb') as content:
|
||||||
text_body = content.read()
|
binary_body = content.read()
|
||||||
|
text_body = binary_body.decode(error='ignore')
|
||||||
for key in keys:
|
for key in keys:
|
||||||
# naively match the entire file, low chance of incorrect
|
# naively match the entire file, low chance of incorrect
|
||||||
# collision
|
# collision
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue