Skip to content

Commit

Permalink
Display columns in the order of -c options
Browse files Browse the repository at this point in the history
Fixes bug 1085785

Change-Id: Ifd8ddfbb7fa5e32be96febe981a6baf57b5e58c7
  • Loading branch information
amotoki committed Dec 3, 2012
1 parent f6dcfd8 commit b8ef8ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion quantumclient/quantum/v2_0/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,9 @@ def get_data(self, parsed_args):
if not _columns:
# clean the parsed_args.columns so that cliff will not break
parsed_args.columns = []
elif not parsed_args.columns and self.list_columns:
elif parsed_args.columns:
_columns = [x for x in parsed_args.columns if x in _columns]
elif self.list_columns:
# if no -c(s) by user and list_columns, we use columns in
# both list_columns and returned resource.
# Also Keep their order the same as in list_columns
Expand Down

0 comments on commit b8ef8ac

Please sign in to comment.