Capabilities class __repr__ still crashes after fix committed

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

Bug Description

Initially the AttributeError could be generated via the following steps:

In python console, execute the following

from cinderclient.v2 import capabilities
cap = capabilities.Capabilities(None, {})
print(cap)

The initial patch fixed the issue but the merged patch still throws
error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/cinderclient/v2/capabilities.py", line 25, in __repr__
    if self._info['namespace'] is None:
KeyError: 'namespace'

Patch Link : https://review.openstack.org/#/c/320223/3

Changed in python-cinderclient:
assignee: nobody → Rajat Dhasmana (whoami-rajat)
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/588346
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=b3487484d8250ef7036e75d8dbd85e30d629a35e
Submitter: Zuul
Branch: master

commit b3487484d8250ef7036e75d8dbd85e30d629a35e
Author: whoami-rajat <email address hidden>
Date: Thu Aug 2 17:06:05 2018 +0000

    __repr__ crashes when empty dict passed

    The Capabilities class __repr__ method crashes when
    along with any manager object, the info is passed as
    empty dict.
    This patch handles the issue.

    Change-Id: Ife5cfc82137d107b27b011aa83c3a9c89e78d701
    Closes-Bug: #1785091

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 4.1.0

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