add actual column names to error msg

Closes-Bug: 1712876

Change-Id: I2f251966fc1286b286b8625ebee5bb431aad232e
This commit is contained in:
Dan Kirkwood 2017-08-27 16:52:48 -06:00
parent dacbd601d8
commit 9ce5e930e5
1 changed files with 4 additions and 2 deletions

View File

@ -100,8 +100,10 @@ class DisplayCommandBase(command.Command):
columns_to_include = [c for c in column_names
if c in parsed_args.columns]
if not columns_to_include:
raise ValueError('No recognized column names in %s' %
str(parsed_args.columns))
raise ValueError('No recognized column names in %s. '
'Recognized columns are %s.' %
(str(parsed_args.columns), str(column_names)))
# Set up argument to compress()
selector = [(c in columns_to_include)
for c in column_names]