diff options
| author | Steve Martinelli <stevemar@ca.ibm.com> | 2015-04-19 02:41:04 -0400 |
|---|---|---|
| committer | Steve Martinelli <stevemar@ca.ibm.com> | 2015-04-19 02:41:04 -0400 |
| commit | 00eeb3593ca6cdd4a3c714ce49435ed74d5e0630 (patch) | |
| tree | bad68ec8bd3cb78d73784ce2f53fc25a9b0c1764 /openstackclient/identity/v3/user.py | |
| parent | fd8b284164da76a1a40726a2af6490b24a53e5d8 (diff) | |
| download | python-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/user.py')
| -rw-r--r-- | openstackclient/identity/v3/user.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/openstackclient/identity/v3/user.py b/openstackclient/identity/v3/user.py index 0a154f64..c1a0a43c 100644 --- a/openstackclient/identity/v3/user.py +++ b/openstackclient/identity/v3/user.py @@ -94,19 +94,17 @@ class CreateUser(show.ShowOne): self.log.debug('take_action(%s)', parsed_args) identity_client = self.app.client_manager.identity + project_id = None if parsed_args.project: project_id = utils.find_resource( identity_client.projects, parsed_args.project, ).id - else: - project_id = None + domain_id = None if parsed_args.domain: domain_id = common.find_domain(identity_client, parsed_args.domain).id - else: - domain_id = None enabled = True if parsed_args.disable: @@ -211,11 +209,10 @@ class ListUser(lister.Lister): self.log.debug('take_action(%s)', parsed_args) identity_client = self.app.client_manager.identity + domain = None if parsed_args.domain: domain = common.find_domain(identity_client, parsed_args.domain).id - else: - domain = None if parsed_args.group: group = utils.find_resource( |
