From 3d7430463c733e1dfcf8487ce955abd863f9f617 Mon Sep 17 00:00:00 2001 From: Mohan Muppidi Date: Sun, 28 Feb 2016 09:43:44 +0000 Subject: take_action() method from command.Command shouldn't return command.Command and command.Showone are base classes implemented in cliff framework. Showone extends Command to allow take_action() to return data to be formatted using a user-selectable formatter. Most of the classes which are extended from Command in openstackclient/identity/v3/ in some cases return data or return nothing where it is not necessary, this commit fixes most of them. Change-Id: I84c72ea4d6680f8bdbef5449316dd9a8af8c8286 Closes-Bug: 1550892 --- openstackclient/identity/v3/user.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'openstackclient/identity/v3/user.py') diff --git a/openstackclient/identity/v3/user.py b/openstackclient/identity/v3/user.py index c694c6ae..93b33090 100644 --- a/openstackclient/identity/v3/user.py +++ b/openstackclient/identity/v3/user.py @@ -17,6 +17,7 @@ import copy import six +import sys from keystoneauth1 import exceptions as ks_exc @@ -162,7 +163,6 @@ class DeleteUser(command.Command): user_obj = utils.find_resource(identity_client.users, user) identity_client.users.delete(user_obj.id) - return class ListUser(command.Lister): @@ -334,13 +334,15 @@ class SetUser(command.Command): and not parsed_args.description and not parsed_args.enable and not parsed_args.disable): + sys.stderr.write("Incorrect set of arguments " + "provided. See openstack --help for more " + "details\n") return user = utils.find_resource( identity_client.users, parsed_args.user, ) - kwargs = {} if parsed_args.name: kwargs['name'] = parsed_args.name @@ -362,7 +364,6 @@ class SetUser(command.Command): kwargs['enabled'] = False identity_client.users.update(user.id, **kwargs) - return class SetPasswordUser(command.Command): -- cgit v1.2.1