incorrect alignment for the columns

Bug #1583880 reported by xiexs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
Fix Released
Undecided
xiexs

Bug Description

From the code of cinderclient the expected alginment for all columns should be left aligned,
but the real output (e.g cinder show) is centre aligned.
cinderclient/utils.py:
    189 def print_dict(d, property="Property", formatters=None):
    190 pt = prettytable.PrettyTable([property, 'Value'], caching=False)
    191 pt.aligns = ['l', 'l']

The reason for this issue is that the "aligns" attribute is a nonexistent attribute in the PrettyTable,
"align" instead.

[1]https://pypi.python.org/pypi/PTable/0.9.0

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

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

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

Reviewed: https://review.openstack.org/319038
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=6e54ec81feb795a3d31030fd348774b4b8195364
Submitter: Jenkins
Branch: master

commit 6e54ec81feb795a3d31030fd348774b4b8195364
Author: xiexs <email address hidden>
Date: Thu May 19 22:59:26 2016 -0400

    Fix the incorrect alignment

    The "aligns" attribute no longer exists in the Prettytable,
    "align" instead. So we should use "align" attribute to force
    the output with left alignment by default.

    Change-Id: I97b30216000b6e31c1bef614cf0b0d68ab8cfb08
    Closes-Bug: #1583880

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

This issue was fixed in the openstack/python-cinderclient 1.9.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.