mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-03-29 18:16:52 +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',
|
||||
):
|
||||
try:
|
||||
keys.add(parser.get(section, var))
|
||||
key = parser.get(section, var).strip()
|
||||
if key:
|
||||
keys.add(key)
|
||||
except configparser.NoOptionError:
|
||||
pass
|
||||
return keys
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue