Flavor access __repr__ method crashes

Bug #1331602 reported by Henrique Truta
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
Undecided
Henrique Truta

Bug Description

When the Flavor Access __repr__ method is called, it raises an "AttributeError: name", once the FlavorAccess class object does not have this attribute.

Traceback (most recent call last):
  File "novatests.py", line 290, in test_get_private_flavor_project_member
    print flav
  File "/opt/stack/python-novaclient/novaclient/v1_1/flavor_access.py", line 24, in __repr__
    return "<FlavorAccess: %s>" % self.name
  File "/opt/stack/python-novaclient/novaclient/openstack/common/apiclient/base.py", line 464, in __getattr__
    raise AttributeError(k)
AttributeError: name

Revision history for this message
Matt Riedemann (mriedem) wrote :

Which version of python-novaclient are you using?

Revision history for this message
Henrique Truta (henriquetruta) wrote :
Changed in python-novaclient:
assignee: nobody → Henrique Truta (henrique-4)
Changed in python-novaclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/100988
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=465d3834719b1e26734af490451ab497519e642f
Submitter: Jenkins
Branch: master

commit 465d3834719b1e26734af490451ab497519e642f
Author: henriquetruta <email address hidden>
Date: Wed Jun 18 15:30:24 2014 -0300

    Fixing flavor access __repr__ method

    The Flavor Access __repr__ method was crashing because
    it was using a non-existing attribute called "name".
    On this fix, this method will now return the following:

    <FlavorAccess flavor id: {flavor_id}, tenant id: {tenant_id}>

    Closes-bug: #1331602

    Change-Id: Ia2c24312e59e6c0aba1009766a15d390dc2721b1

Changed in python-novaclient:
status: In Progress → Fix Committed
Michael Still (mikal)
Changed in python-novaclient:
milestone: none → 2.18.0
Michael Still (mikal)
Changed in python-novaclient:
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.