Removes trailing blank in trust show

Previously a blank character at the end of the roles value would remain

Change-Id: I0961a5f9fb4b270a6055ee69898eadee315e416a
Closes-Bug: 1474707
This commit is contained in:
Gilles Dubreuil 2015-07-15 17:19:30 +10:00 committed by Steve Martinelli
parent 1af89f757c
commit 00b4e38d3c
2 changed files with 4 additions and 4 deletions

View File

@ -144,7 +144,7 @@ class CreateTrust(show.ShowOne):
# Format roles into something sensible
roles = trust._info.pop('roles')
msg = ''.join([r['name'] + ' ' for r in roles])
msg = ' '.join(r['name'] for r in roles)
trust._info['roles'] = msg
return zip(*sorted(six.iteritems(trust._info)))
@ -215,7 +215,7 @@ class ShowTrust(show.ShowOne):
# Format roles into something sensible
roles = trust._info.pop('roles')
msg = ''.join([r['name'] + ' ' for r in roles])
msg = ' '.join(r['name'] for r in roles)
trust._info['roles'] = msg
return zip(*sorted(six.iteritems(trust._info)))

View File

@ -107,7 +107,7 @@ class TestTrustCreate(TestTrust):
identity_fakes.trust_id,
identity_fakes.trust_impersonation,
identity_fakes.project_id,
identity_fakes.role_name + ' ',
identity_fakes.role_name,
identity_fakes.user_id,
identity_fakes.user_id
)
@ -222,7 +222,7 @@ class TestTrustShow(TestTrust):
identity_fakes.trust_id,
identity_fakes.trust_impersonation,
identity_fakes.project_id,
identity_fakes.role_name + ' ',
identity_fakes.role_name,
identity_fakes.user_id,
identity_fakes.user_id
)