mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fails if gpgowner is set in smtp returner config but the installation lacks gnupg module
This commit is contained in:
parent
27449c5a9b
commit
0427879d19
1 changed files with 2 additions and 1 deletions
|
@ -217,7 +217,8 @@ def returner(ret):
|
|||
input_data=template,
|
||||
**ret)
|
||||
|
||||
if HAS_GNUPG and gpgowner:
|
||||
if gpgowner:
|
||||
assert HAS_GNUPG, "gnupg is required in order to user gpgowner in smtp returner"
|
||||
gpg = gnupg.GPG(gnupghome=os.path.expanduser('~{0}/.gnupg'.format(gpgowner)),
|
||||
options=['--trust-model always'])
|
||||
encrypted_data = gpg.encrypt(content, to_addrs)
|
||||
|
|
Loading…
Add table
Reference in a new issue