From a2f5b646ad648557c5d7daed2ee1bb51c23a91ee Mon Sep 17 00:00:00 2001 From: Mike Place Date: Wed, 17 Jun 2015 11:30:08 -0600 Subject: [PATCH] Switch to get to fix failing test --- salt/modules/gpg.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/salt/modules/gpg.py b/salt/modules/gpg.py index da6d3c29b5..a496009124 100644 --- a/salt/modules/gpg.py +++ b/salt/modules/gpg.py @@ -647,14 +647,14 @@ def import_key(user=None, log.debug('imported_data {0}'.format(list(import_result.__dict__.keys()))) log.debug('imported_data {0}'.format(counts)) - if counts['imported'] or counts['imported_rsa']: + if counts.get('imported') or counts.get('imported_rsa'): ret['message'] = 'Successfully imported key(s).' - elif counts['unchanged']: + elif counts.get('unchanged'): ret['message'] = 'Key(s) already exist in keychain.' - elif counts['not_imported']: + elif counts.get('not_imported'): ret['res'] = False ret['message'] = 'Unable to import key.' - elif not counts['count']: + elif not counts.get('count'): ret['res'] = False ret['message'] = 'Unable to import key.'