api.base.APIDictWrapper can't handle "in"

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

Bug Description

The APIDictWrapper class within openstack-dashboards/api/base.py can't handle the "in" operator correctly.

Also, it will fail if a non-string is passed into it's __getitem__ method. (Which is what is called from a dict lookup.)

The get method also fails on non-strings.

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/97906

Changed in horizon:
status: New → In Progress
Revision history for this message
Matthew D. Wood (woodm1979) wrote :

For those looking for more info about the "in" operator failure:

https://docs.python.org/2/reference/expressions.html#in

Changed in horizon:
milestone: none → juno-1
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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

commit e3bf9c40615237e7688ef6b570212fdd8899f8a8
Author: woodm1979 <email address hidden>
Date: Wed Jun 4 14:10:29 2014 -0600

    APIDictWrapper getitem lookups fail for non str

    The APIDictWrapper class within openstack-dashboards/api/base.py can't
    handle the "in" operator correctly.

    Also, it will fail if a non-string is passed into it's __getitem__
    method. (Which is what is called from a dict lookup.)

    The get method also fails on non-strings.

    Change-Id: Iaad66d3c6deb81d0570b1a8c6ddf580024fa46e6
    Closes-Bug: 1326512

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