Comment 1 for bug 1548674

Revision history for this message
Pavlo Shchelokovskyy (pshchelo) wrote :

only the table output formatter is affected, vaule, csv, json, yaml are fine. the traceback from "openstack --debug server list" is

RESP BODY: {"servers": []}

list index out of range
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 378, in run_subcommand
    result = cmd.run(parsed_args)
  File "/opt/stack/python-openstackclient/openstackclient/common/command.py", line 37, in run
    return super(Command, self).run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/cliff/display.py", line 88, in run
    self.produce_output(parsed_args, column_names, data)
  File "/usr/local/lib/python2.7/dist-packages/cliff/lister.py", line 51, in produce_output
    parsed_args,
  File "/usr/local/lib/python2.7/dist-packages/cliff/formatters/table.py", line 64, in emit_list
    stdout, x, int(parsed_args.max_width), min_width)
  File "/usr/local/lib/python2.7/dist-packages/cliff/formatters/table.py", line 148, in _assign_max_widths
    first_line = x.get_string().splitlines()[0]
IndexError: list index out of range
clean_up ListServer: list index out of range
Traceback (most recent call last):
  File "/opt/stack/python-openstackclient/openstackclient/shell.py", line 113, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 258, in run
    result = self.run_subcommand(remainder)
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 378, in run_subcommand
    result = cmd.run(parsed_args)
  File "/opt/stack/python-openstackclient/openstackclient/common/command.py", line 37, in run
    return super(Command, self).run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/cliff/display.py", line 88, in run
    self.produce_output(parsed_args, column_names, data)
  File "/usr/local/lib/python2.7/dist-packages/cliff/lister.py", line 51, in produce_output
    parsed_args,
  File "/usr/local/lib/python2.7/dist-packages/cliff/formatters/table.py", line 64, in emit_list
    stdout, x, int(parsed_args.max_width), min_width)
  File "/usr/local/lib/python2.7/dist-packages/cliff/formatters/table.py", line 148, in _assign_max_widths
    first_line = x.get_string().splitlines()[0]
IndexError: list index out of range

END return value: 1