summaryrefslogtreecommitdiff
path: root/openstackclient/identity/v3/trust.py
diff options
context:
space:
mode:
authorSteve Martinelli <stevemar@ca.ibm.com>2015-04-19 02:41:04 -0400
committerSteve Martinelli <stevemar@ca.ibm.com>2015-04-19 02:41:04 -0400
commit00eeb3593ca6cdd4a3c714ce49435ed74d5e0630 (patch)
treebad68ec8bd3cb78d73784ce2f53fc25a9b0c1764 /openstackclient/identity/v3/trust.py
parentfd8b284164da76a1a40726a2af6490b24a53e5d8 (diff)
downloadpython-openstackclient-00eeb3593ca6cdd4a3c714ce49435ed74d5e0630.tar.gz
remove unnecessary conditionals
In several places we had else branches where a reasonable default would do the job. This makes the code a mean cleaer and easier to read. Change-Id: I231e09aab85fd32b8300bc33c48d0899b728b96e
Diffstat (limited to 'openstackclient/identity/v3/trust.py')
-rw-r--r--openstackclient/identity/v3/trust.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/openstackclient/identity/v3/trust.py b/openstackclient/identity/v3/trust.py
index e67b02e7..ab6673d2 100644
--- a/openstackclient/identity/v3/trust.py
+++ b/openstackclient/identity/v3/trust.py
@@ -92,23 +92,20 @@ class CreateTrust(show.ShowOne):
self.log.debug('take_action(%s)' % parsed_args)
identity_client = self.app.client_manager.identity
+ project_domain = None
if parsed_args.project_domain:
project_domain = common.find_domain(identity_client,
parsed_args.project_domain).id
- else:
- project_domain = None
+ trustor_domain = None
if parsed_args.trustor_domain:
trustor_domain = common.find_domain(identity_client,
parsed_args.trustor_domain).id
- else:
- trustor_domain = None
+ trustee_domain = None
if parsed_args.trustee_domain:
trustee_domain = common.find_domain(identity_client,
parsed_args.trustee_domain).id
- else:
- trustee_domain = None
# NOTE(stevemar): Find the two users, project and roles that
# are necessary for making a trust usable, the API dictates that