~ubuntuone-control-tower/ubuntuone-client/trunk

« back to all changes in this revision

Viewing changes to ubuntuone/syncdaemon/action_queue.py

  • Committer: Tarmac
  • Author(s): Rodney Dawes
  • Date: 2013-01-11 20:42:44 UTC
  • mfrom: (1363.1.1 no-simplejson)
  • Revision ID: tarmac-20130111204244-u0bi8amybn63mplo
Drop the dependency on simplejson and use the standard json module.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
import os
35
35
import random
36
36
import re
37
 
import simplejson
 
37
import json
38
38
import tempfile
39
39
import traceback
40
40
import uuid
2265
2265
        pdata = urlencode(data)
2266
2266
        response = yield self.action_queue.webcall(iri, method="POST",
2267
2267
                                                   post_content=pdata)
2268
 
        defer.returnValue(simplejson.loads(response.content))
 
2268
        defer.returnValue(json.loads(response.content))
2269
2269
 
2270
2270
    def _run(self):
2271
2271
        """See ActionQueueCommand."""
2303
2303
 
2304
2304
        response = yield self.action_queue.webcall(self._iri, method="GET")
2305
2305
 
2306
 
        files = simplejson.loads(response.content)
 
2306
        files = json.loads(response.content)
2307
2307
        # translate nodekeys to (volume_id, node_id)
2308
2308
        for pf in files:
2309
2309
            _, node_id = self.split_nodekey(pf.pop('nodekey'))