Table doesn't display well when there are '\r' in table data

Bug #1476929 reported by Liyingjun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cliff
Fix Released
Undecided
Terry Howe

Bug Description

An example:

$ openstack project show --format shell 00c64cd4bc2045049cc0050c1e59adf9
description="test
test1
test2" ------------------------------->>> description contains '\r' with multiline
enabled="True"
id="00c64cd4bc2045049cc0050c1e59adf9"
name="test3"

Prettytable:

$ openstack project show 00c64cd4bc2045049cc0050c1e59adf9+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
                            |
                           |
| | test2 |
| enabled | True |
| id | 00c64cd4bc2045049cc0050c1e59adf9 |
| name | test3 |
+-------------+----------------------------------+

Liyingjun (liyingjun)
Changed in python-cliff:
assignee: nobody → Liyingjun (liyingjun)
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/204449

Changed in python-cliff:
status: New → In Progress
Changed in python-cliff:
assignee: Liyingjun (liyingjun) → Terry Howe (thowe-g)
Revision history for this message
Terry Howe (thowe-g) wrote :

Not sure why that got assigned to me, but I can't seem to assign it back.

Changed in python-cliff:
assignee: Terry Howe (thowe-g) → nobody
assignee: nobody → Terry Howe (thowe-g)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cliff (master)

Reviewed: https://review.openstack.org/204449
Committed: https://git.openstack.org/cgit/openstack/cliff/commit/?id=22ceb9c9b9570601be6f8ef28bc01a073359a9c0
Submitter: Jenkins
Branch: master

commit 22ceb9c9b9570601be6f8ef28bc01a073359a9c0
Author: liyingjun <email address hidden>
Date: Wed Jul 22 14:12:48 2015 +0800

    Replace '\r' with ' ' for prettytable

    Table doesn't display well when there are '\r' in prettytable data.
    Fixes it by replace '\r\n' with '\n' and '\r' with ' '.

    Change-Id: I1fde6d33c211e9629ee0dbeab241eeba20f7b8d5
    Closes-bug: #1476929

Changed in python-cliff:
status: In Progress → Fix Committed
Changed in python-cliff:
milestone: none → 1.15.0
status: Fix Committed → Fix Released
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.