Merge lp:~statik/desktopcouch/prefer-json-simplejson into lp:desktopcouch

Proposed by Elliot Murphy
Status: Merged
Merged at revision: not available
Proposed branch: lp:~statik/desktopcouch/prefer-json-simplejson
Merge into: lp:desktopcouch
Diff against target: 20 lines (+8/-1)
1 file modified
desktopcouch/replication_services/ubuntuone.py (+8/-1)
To merge this branch: bzr merge lp:~statik/desktopcouch/prefer-json-simplejson
Reviewer Review Type Date Requested Status
Tim Cole (community) Needs Fixing
Chad Miller (community) Approve
Review via email: mp+21089@code.launchpad.net

Commit message

Use the built in json module in python2.6 when the simplejson module is not available.

Description of the change

Use built in json module in python2.6.

To post a comment you must log in.
Revision history for this message
Chad Miller (cmiller) wrote :

Yes!

review: Approve
Revision history for this message
Tim Cole (tcole) wrote :

Still need to change the simplejson.* to json.* below the imports.

review: Needs Fixing
Revision history for this message
Elliot Murphy (statik) wrote :

Fixed and pushed rev 137.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'desktopcouch/replication_services/ubuntuone.py'
2--- desktopcouch/replication_services/ubuntuone.py 2010-03-10 19:08:16 +0000
3+++ desktopcouch/replication_services/ubuntuone.py 2010-03-10 22:22:15 +0000
4@@ -1,9 +1,16 @@
5 from oauth import oauth
6 import logging
7 import httplib2
8-import simplejson
9 import gnomekeyring
10
11+try:
12+ # Python 2.5
13+ import simplejson as json
14+except ImportError:
15+ # Python 2.6+
16+ import json
17+
18+
19 name = "Ubuntu One"
20 description = "The Ubuntu One cloud service"
21

Subscribers

People subscribed via source and target branches