mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
raise exception if keyfile specified but does not exist
help user troubleshooting easier than return None
This commit is contained in:
parent
63c3cd396f
commit
b5a45961e5
@ -63,7 +63,7 @@ def _config(name, key=None, **kwargs):
|
||||
|
||||
def _get_keyring(keyfile):
|
||||
keyring = None
|
||||
if keyfile and __salt__['file.file_exists'](keyfile):
|
||||
if keyfile:
|
||||
with salt.utils.fopen(keyfile) as _f:
|
||||
keyring = dns.tsigkeyring.from_text(json.load(_f))
|
||||
return keyring
|
||||
|
Loading…
Reference in New Issue
Block a user