summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
authorGilles Dubreuil <gilles@redhat.com>2015-07-15 17:19:30 +1000
committerSteve Martinelli <stevemar@ca.ibm.com>2015-07-19 13:33:00 -0700
commit00b4e38d3c3acf01ca5d7ff3cae287b4f8c9df2a (patch)
tree22070aff23554632c846ba769180f1edb7e0d53c /openstackclient
parent1af89f757c1edf44067de964cb6ca8dffbb1969e (diff)
downloadpython-openstackclient-00b4e38d3c3acf01ca5d7ff3cae287b4f8c9df2a.tar.gz
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
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/identity/v3/trust.py4
-rw-r--r--openstackclient/tests/identity/v3/test_trust.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/openstackclient/identity/v3/trust.py b/openstackclient/identity/v3/trust.py
index c8e5c4c7..5104864c 100644
--- a/openstackclient/identity/v3/trust.py
+++ b/openstackclient/identity/v3/trust.py
@@ -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)))
diff --git a/openstackclient/tests/identity/v3/test_trust.py b/openstackclient/tests/identity/v3/test_trust.py
index b3fbe7f0..b90e7815 100644
--- a/openstackclient/tests/identity/v3/test_trust.py
+++ b/openstackclient/tests/identity/v3/test_trust.py
@@ -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
)