Wrong representation of Attributes

Bug #1473974 reported by Sergey Kraynev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Low
Sergey Kraynev

Bug Description

If you try to display Attributes class during debugging or via str() function you will get follow traceback:

  File "heat/engine/attributes.py", line 236, in __repr__
    '\n\t'.join(six.itervalues(self._attributes)))
TypeError: sequence item 0: expected string, Attribute found

It happens due to "join" expect list, but six.itervalues(self._attributes) returns Attribute classes. To fix it we need to use just "self"
instead of self._attributes.

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

Reviewed: https://review.openstack.org/200059
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=658d61ecee175036b81b0c6897587c0506a07679
Submitter: Jenkins
Branch: master

commit 658d61ecee175036b81b0c6897587c0506a07679
Author: Sergey Kraynev <email address hidden>
Date: Thu Jul 9 08:48:21 2015 -0400

    Use __iter__ method of Attributes class in __repr__ method

    Join method expects list, but six.itervalues(self._attributes) returns
    a Attribute instance, so we should use own __iter__ method for building
    list of values.

    Closes-Bug: #1473974

    Change-Id: I7c5d4a5a8d0142156c3416347940b9e90ed8df5c

Changed in heat:
status: In Progress → Fix Committed
Changed in heat:
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in heat:
milestone: none → liberty-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: liberty-2 → 5.0.0
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.