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:
Takashi NATSUME 2019-03-01 15:44:30 +09:00
parent a966e2c3f0
commit a306395d74

View File

@ -4524,7 +4524,7 @@ 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)