mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-08 04:34:16 +00:00
Adding a check to make sure either spaces or null values are not mistakenly added into the key variable
This commit is contained in:
parent
e19917ae62
commit
83fca4c614
1 changed files with 3 additions and 1 deletions
|
|
@ -53,7 +53,9 @@ def get_aws_secrets_from_file(credentials_file):
|
||||||
'aws_session_token',
|
'aws_session_token',
|
||||||
):
|
):
|
||||||
try:
|
try:
|
||||||
keys.add(parser.get(section, var))
|
key = parser.get(section, var).strip()
|
||||||
|
if key:
|
||||||
|
keys.add(key)
|
||||||
except configparser.NoOptionError:
|
except configparser.NoOptionError:
|
||||||
pass
|
pass
|
||||||
return keys
|
return keys
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue