Use 'config_dir' setting instead of CONFIG_DIR in gpg renderer

This change makes it possible for --config-dir to work from the CLI.

Fixes #34037
This commit is contained in:
rallytime 2016-06-23 16:28:21 -06:00
parent 56c7267631
commit c4c037d600

View file

@ -123,10 +123,14 @@ def _get_key_dir():
'''
return the location of the GPG key directory
'''
if __salt__['config.get']('gpg_keydir'):
return __salt__['config.get']('gpg_keydir')
else:
return os.path.join(salt.syspaths.CONFIG_DIR, 'gpgkeys')
key_dir = __salt__['config.get']('gpg_keydir')
if not key_dir:
key_dir = os.path.join(
__salt__['config.get']('config_dir'),
'gpgkeys'
)
return key_dir
def _decrypt_ciphertext(cipher):