'dict' object has no attribute 'to_dict' in rpc/amqp.py

Bug #1208971 reported by Lance Bragstad
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo-incubator
Fix Released
Undecided
Lance Bragstad

Bug Description

When applying the Oslo notifier to the keystone project I was unable to send a notification using the notification driver, resulting in the following trace:

http://paste.openstack.org/show/43344/

I believe this is a result of the variable 'context' being assumed as a non-dictionary object. The following is the method within /oslo-incubator/openstack/common/rpc/amqp.py def pack_context():

https://github.com/openstack/oslo-incubator/blob/master/openstack/common/rpc/amqp.py#L303

We could have a check here to handle this case similar to:

http://paste.openstack.org/show/43345/

Changed in oslo:
assignee: nobody → Lance Bragstad (ldbragst)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo-incubator (master)

Reviewed: https://review.openstack.org/40494
Committed: http://github.com/openstack/oslo-incubator/commit/61c4cdec304d79f43c8a549c2543c939492c4812
Submitter: Jenkins
Branch: master

commit 61c4cdec304d79f43c8a549c2543c939492c4812
Author: Lance Bragstad <email address hidden>
Date: Tue Aug 6 20:27:18 2013 +0000

    Ensure context type is handled when using to_dict

    Handle the case where the context passed into def pack_context() is a
    dictionary. If a dictionary is passed in, we don't need to call to_dict
    before updating the msg.

    fixes bug 1208971

    Change-Id: I2ce0b28f97634e717868e0ee5525189338d4981c

Changed in oslo:
status: In Progress → Fix Committed
Mark McLoughlin (markmc)
tags: added: rpc-api-review
Thierry Carrez (ttx)
Changed in oslo:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in oslo:
milestone: havana-3 → 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.