diff options
| author | Yong Sheng Gong <gongysh@cn.ibm.com> | 2012-08-12 09:33:40 +0800 |
|---|---|---|
| committer | Yong Sheng Gong <gongysh@cn.ibm.com> | 2012-08-12 09:37:48 +0800 |
| commit | 060057c5840949abcb5eea3b2b424bf4e5c8df5a (patch) | |
| tree | b8b1a17ec0caa9cfc2ba6f8c73dbb507aeea4ef9 /quantumclient/quantum | |
| parent | defb5481b0e7e2469405de98e6dd49ed239ef986 (diff) | |
| download | python-neutronclient-060057c5840949abcb5eea3b2b424bf4e5c8df5a.tar.gz | |
deal with -c option when the list result is empty.
bug #1033123
Change-Id: Idd10e9ae8fd57e6173ef7f92411176834efebff5
Diffstat (limited to 'quantumclient/quantum')
| -rw-r--r-- | quantumclient/quantum/v2_0/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/quantumclient/quantum/v2_0/__init__.py b/quantumclient/quantum/v2_0/__init__.py index 5de594b..78c5339 100644 --- a/quantumclient/quantum/v2_0/__init__.py +++ b/quantumclient/quantum/v2_0/__init__.py @@ -362,6 +362,8 @@ class ListCommand(QuantumCommand, lister.Lister): if collection in data: info = data[collection] _columns = len(info) > 0 and sorted(info[0].keys()) or [] + if not _columns: + parsed_args.columns = [] return (_columns, (utils.get_item_properties( s, _columns, formatters=self._formatters, ) for s in info), ) |
