Merge lp:~james-w/lazr.restfulclient/ensure-representations-are-json into lp:lazr.restfulclient

Proposed by James Westby
Status: Merged
Merged at revision: 103
Proposed branch: lp:~james-w/lazr.restfulclient/ensure-representations-are-json
Merge into: lp:lazr.restfulclient
Diff against target: 12 lines (+1/-1)
1 file modified
src/lazr/restfulclient/resource.py (+1/-1)
To merge this branch: bzr merge lp:~james-w/lazr.restfulclient/ensure-representations-are-json
Reviewer Review Type Date Requested Status
Leonard Richardson (community) Approve
Review via email: mp+29945@code.launchpad.net

Description of the change

Fix the last case of a call to simplejson.loads not using
unicode().

No test changes as the tests already failed for me.

Thanks,

James

To post a comment you must log in.
Revision history for this message
Leonard Richardson (leonardr) wrote :

Looks great. I'll merge it.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/lazr/restfulclient/resource.py'
2--- src/lazr/restfulclient/resource.py 2010-06-25 15:48:58 +0000
3+++ src/lazr/restfulclient/resource.py 2010-07-15 01:15:51 +0000
4@@ -329,7 +329,7 @@
5 if self._wadl_resource.representation is None:
6 # Get a representation of the linked resource.
7 representation = self._root._browser.get(self._wadl_resource)
8- representation = simplejson.loads(representation)
9+ representation = simplejson.loads(unicode(representation))
10 type_link = representation['resource_type_link']
11 if (type_link is not None
12 and type_link != self._wadl_resource.type_url):

Subscribers

People subscribed via source and target branches