Dictionary creation could be rewritten as a dictionary literal

Bug #1482586 reported by Ankit Agrawal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Low
Ankit Agrawal

Bug Description

There are several places where dict is created and then initialized with keys later.

for example.

test_metadef_resourcetypes.py module,
ResourceTypeController->index method.

filters = {}
filter['namespace'] = namespace

could be rewritten as

filters = {'namespace': namespace}

Changed in glance:
assignee: nobody → Ankit Agrawal (ankitagrawal)
Changed in glance:
status: New → In Progress
Changed in glance:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/210303
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=16ab5d7c1781626293ec67b57f66dbfcc3cd2176
Submitter: Jenkins
Branch: master

commit 16ab5d7c1781626293ec67b57f66dbfcc3cd2176
Author: ankitagrawal <email address hidden>
Date: Wed Aug 5 05:20:51 2015 -0700

    Use dictionary literal for dictionary creation

    Dictionary creation could be rewritten as a dictionary literal.
    for example:

    filters = {}
    filter['namespace'] = namespace

    could be rewritten as

    filters = {'namespace': namespace}

    Closes-Bug: 1482586
    Change-Id: I860483e958296da248a579a6032c14370843d9e4

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → liberty-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: liberty-rc1 → 11.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.