mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Limit keyring to a single one
This commit is contained in:
parent
32cfcfd777
commit
2a30b0a9cd
1 changed files with 5 additions and 0 deletions
|
@ -192,6 +192,11 @@ def _create_gpg(user=None, gnupghome=None, keyring=None):
|
|||
if not gnupghome:
|
||||
gnupghome = _get_user_gnupghome(user)
|
||||
|
||||
if keyring and not isinstance(keyring, str):
|
||||
raise SaltInvocationError(
|
||||
"Please pass keyring as a string. Multiple keyrings are not allowed"
|
||||
)
|
||||
|
||||
gpg = gnupg.GPG(gnupghome=gnupghome, keyring=keyring)
|
||||
|
||||
return gpg
|
||||
|
|
Loading…
Add table
Reference in a new issue