add newline if the output formatter is json

Bug #1657683 reported by shizhihui
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cliff
Fix Released
Undecided
shizhihui

Bug Description

When we use the command with output formatter is json, we may get result like these:

(1)
[root@zhihui cliff]# openstack volume type list -f json
[
  {
    "ID": "0a42e6d8-30a9-4281-892a-5e88d938a5ab",
    "Name": "lvmdriver-1"
  }
][root@zhihui cliff]#

(2)
[root@zhihui cliff]# openstack stack list -f json
[
  {
    "Updated Time": null,
    "Stack Status": "CREATE_COMPLETE",
    "Stack Name": "test",
    "ID": "ba94a8bd-7172-4ece-9294-66bfe763136b",
    "Creation Time": "2016-11-11T10:49:24Z"
  }
][root@zhihui cliff]#
...

The result is so terrible, so I fix it.

shizhihui (shizhihui)
Changed in python-cliff:
assignee: nobody → shizhihui (shizhihui)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cliff (master)

Fix proposed to branch: master
Review: https://review.openstack.org/422488

Changed in python-cliff:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cliff (master)

Reviewed: https://review.openstack.org/422488
Committed: https://git.openstack.org/cgit/openstack/cliff/commit/?id=49ce4c18afc06a7b1766e5599d2f77f4a27e7b6e
Submitter: Jenkins
Branch: master

commit 49ce4c18afc06a7b1766e5599d2f77f4a27e7b6e
Author: shizhihui <email address hidden>
Date: Tue Nov 15 05:58:36 2016 +0800

    Add newline if the output formatter is json

    Change-Id: I4955a148713a9338b6c423e712576adcfd2305f1
    Closes-Bug: #1657683

Changed in python-cliff:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cliff 2.5.0

This issue was fixed in the openstack/cliff 2.5.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.