Remove unnecessary if statement
The interface_list method of the novaclient.v2.server.Server class always returns an object of the novaclient.base.ListWithMeta class which is a sub class of list. So 'if' statement that check whether it is an instance of list is not necessary when printing the return value of the method. Change-Id: I5dc5bfc6a783bb59c3aec2cce626bb00de633754
This commit is contained in:
parent
a966e2c3f0
commit
a306395d74
@ -4524,10 +4524,10 @@ def do_interface_list(cs, args):
|
||||
server = _find_server(cs, args.server)
|
||||
|
||||
res = server.interface_list()
|
||||
if isinstance(res, list):
|
||||
# The "tag" field is in the response starting with microversion 2.70.
|
||||
show_tag = cs.api_version >= api_versions.APIVersion('2.70')
|
||||
_print_interfaces(res, show_tag=show_tag)
|
||||
|
||||
# The "tag" field is in the response starting with microversion 2.70.
|
||||
show_tag = cs.api_version >= api_versions.APIVersion('2.70')
|
||||
_print_interfaces(res, show_tag=show_tag)
|
||||
|
||||
|
||||
@utils.arg('server', metavar='<server>', help=_('Name or ID of server.'))
|
||||
|
Loading…
Reference in New Issue
Block a user