_to_parameters() in template_resource.py has clashing loop variables

Bug #1235077 reported by Angus Salkeld
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Angus Salkeld

Bug Description

there are 2 loops with the same variable name which can lead to confusing errors

        for n, v in iter(self.properties.props.items()):
       ... later
                        for (i, item) in enumerate(val):
                            for (k, v) in iter(item.items()):

note the "v" is overwritten :-O

Angus Salkeld (asalkeld)
Changed in heat:
assignee: nobody → Angus Salkeld (asalkeld)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: New → In Progress
Angus Salkeld (asalkeld)
Changed in heat:
importance: Undecided → High
status: In Progress → Confirmed
summary: - _parameter() in template_resource.py has clashing loop variables
+ _to_parameters() in template_resource.py has clashing loop variables
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Reviewed: https://review.openstack.org/49673
Committed: http://github.com/openstack/heat/commit/bacc4797657283868dac3a79d2d76bd955733460
Submitter: Jenkins
Branch: master

commit bacc4797657283868dac3a79d2d76bd955733460
Author: Angus Salkeld <email address hidden>
Date: Mon Oct 7 22:10:07 2013 +1100

    Fix clashing loop variables in TemplateResource

    There were two loops using "v" as a variable name.

    Closes-bug: #1235077
    Change-Id: I5198621ce724abe9638da4a7482ae6817bbd86e7

Changed in heat:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/50284

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (milestone-proposed)

Reviewed: https://review.openstack.org/50284
Committed: http://github.com/openstack/heat/commit/47b3de126fd8b06886c02f91c9de633e241f2b28
Submitter: Jenkins
Branch: milestone-proposed

commit 47b3de126fd8b06886c02f91c9de633e241f2b28
Author: Angus Salkeld <email address hidden>
Date: Mon Oct 7 22:10:07 2013 +1100

    Fix clashing loop variables in TemplateResource

    There were two loops using "v" as a variable name.

    Closes-bug: #1235077
    Change-Id: I5198621ce724abe9638da4a7482ae6817bbd86e7

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

Reviewed: https://review.openstack.org/50022
Committed: http://github.com/openstack/heat/commit/d8ed9bdf201a6e1f83f3f8f6585cc1788546bb19
Submitter: Jenkins
Branch: master

commit d8ed9bdf201a6e1f83f3f8f6585cc1788546bb19
Author: Angus Salkeld <email address hidden>
Date: Mon Oct 7 22:13:19 2013 +1100

    Cleanup nested loop variables in TemplateResource

    This patch makes these variables more verbose.

    Change-Id: I40d6d3d2b0ffc9d792c75de51b5107e5fa73bd91
    Partial-bug: #1235077

Thierry Carrez (ttx)
Changed in heat:
milestone: havana-rc2 → 2013.2
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.