Fix --decrypt command line option

This patch fixes the --decrypt flag when retrieving a secret.

Change-Id: Ie36a4522e984447653b54130ba466222566ed5da
Closes-Bug: #1434629
This commit is contained in:
Thomas Herve 2015-03-27 13:47:27 +01:00
parent 4bfc836aec
commit 278398584e
1 changed files with 4 additions and 4 deletions

View File

@ -52,10 +52,10 @@ class GetSecret(show.ShowOne):
def take_action(self, args):
if args.decrypt:
entity = self.app.client.secrets.decrypt(args.URI,
args.payload_content_type)
return (('Secret',),
(entity,))
entity = self.app.client.secrets.get(args.URI,
args.payload_content_type)
return (('Payload',),
(entity.payload,))
else:
entity = self.app.client.secrets.get(secret_ref=args.URI)
return entity._get_formatted_entity()