jsonutils.load() breaks rpc

Bug #1009127 reported by Russell Bryant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-common
Fix Released
Undecided
Russell Bryant

Bug Description

The addition of load() to jsonutils broke kombu. I don't think there was any particular reason this was needed, so I think we should just remove it.

Traceback (most recent call last):
  File "/home/rbryant/src/openstack/openstack-common/openstack/common/rpc/impl_kombu.py", line 141, in _callback
    callback(message.payload)
  File "/home/rbryant/src/openstack/openstack-common/.tox/py27/lib/python2.7/site-packages/kombu/transport/base.py", line 130, in payload
    self._decoded_cache = self.decode()
  File "/home/rbryant/src/openstack/openstack-common/.tox/py27/lib/python2.7/site-packages/kombu/transport/base.py", line 119, in decode
    self.content_encoding)
  File "/home/rbryant/src/openstack/openstack-common/.tox/py27/lib/python2.7/site-packages/kombu/serialization.py", line 136, in decode
    return decoder(data)
  File "/home/rbryant/src/openstack/openstack-common/.tox/py27/lib/python2.7/site-packages/anyjson/__init__.py", line 125, in <lambda>
    deserialize = lambda value: implementation.deserialize(value)
  File "/home/rbryant/src/openstack/openstack-common/.tox/py27/lib/python2.7/site-packages/anyjson/__init__.py", line 92, in deserialize
    return self._decode(s)
  File "/home/rbryant/src/openstack/openstack-common/openstack/common/jsonutils.py", line 123, in load
    return json.load(s)
  File "/usr/lib64/python2.7/json/__init__.py", line 274, in load
    return loads(fp.read(),
AttributeError: 'unicode' object has no attribute 'read'

Changed in openstack-common:
assignee: nobody → Russell Bryant (russellb)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-common (master)

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

Changed in openstack-common:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-common (master)

Reviewed: https://review.openstack.org/8198
Committed: http://github.com/openstack/openstack-common/commit/bdc4fb3183d455f00870981f5b9a200cc1b8b3f1
Submitter: Jenkins
Branch: master

commit bdc4fb3183d455f00870981f5b9a200cc1b8b3f1
Author: Russell Bryant <email address hidden>
Date: Tue Jun 5 13:36:25 2012 -0400

    Revert "Add a load function wrapper to jsonutils"

    This reverts commit 72840edc736b7f4d2366b5049f6516d8f5b901ff.

    This change breaks kombu, so revert it since there is no specific need
    for it.

    Fixes bug 1009127.

    Change-Id: Id0ef8b3948b63d0151289cb7ce8e617d9816bb4b

Changed in openstack-common:
status: In Progress → Fix Committed
Mark McLoughlin (markmc)
Changed in openstack-common:
milestone: none → 2012.2
status: Fix Committed → Fix Released
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.