Partially revert #19912

This commit is contained in:
Colton Myers 2015-01-23 16:41:15 -07:00
parent 55cb7fdab1
commit e3b471d0e8

View File

@ -133,7 +133,10 @@ def render(data, saltenv='base', sls='', argline='', **kwargs):
'''
if not HAS_GPG:
raise SaltRenderError('GPG unavailable')
homedir = __salt__['config.get']('gpg_keydir', DEFAULT_GPG_KEYDIR)
if 'config.get' in __salt__:
homedir = __salt__['config.get']('gpg_keydir', DEFAULT_GPG_KEYDIR)
else:
homedir = __opts__.get('gpg_keydir', DEFAULT_GPG_KEYDIR)
log.debug('Reading GPG keys from: {0}'.format(homedir))
gpg = gnupg.GPG(gnupghome=homedir)
return decrypt_object(data, gpg)