Cleanup dict.update(single elem dict)

Bug #1339849 reported by Matthew D. Wood
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Wishlist
Matthew D. Wood

Bug Description

There's several places in the code where this type of thing exists:

        form_data.update({'vpnservice_id': vpnservice.id})

better would be this:

        form_data['vpnservice_id'] = vpnservice.id

This type of thing bothers me, so I'm going to clean it up.

Changed in horizon:
assignee: nobody → Matthew D. Wood (woodm1979)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
status: New → In Progress
Julie Pichon (jpichon)
Changed in horizon:
importance: Undecided → Low
importance: Low → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/105851
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=28e5874eb713b3589cbe393bc9cefbf6041a6818
Submitter: Jenkins
Branch: master

commit 28e5874eb713b3589cbe393bc9cefbf6041a6818
Author: woodm1979 <email address hidden>
Date: Wed Jul 9 13:31:45 2014 -0600

    Cleaned up dict.update(single elem dict) code

    There's several places in the code where this type of thing exists:
        form_data.update({'vpnservice_id': vpnservice.id})
    better would be this:
        form_data['vpnservice_id'] = vpnservice.id
    This type of thing bothers me, so I'm going to clean it up.

    Also fixed the two cases of:
        if <some_string>.find(<some_other_string>) != -1:
    which should clearly use the "in" operator instead.

    Change-Id: Ic72a5b0a17c211f3949edc69732c1101c24590ec
    Closes-Bug: 1339849

Changed in horizon:
status: In Progress → Fix Committed
Changed in horizon:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-2 → 2014.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.