~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/fileservice_lib/__init__.py

  • Committer: William Grant
  • Date: 2010-07-28 04:13:05 UTC
  • mfrom: (1801.1.2 die-cjson-die)
  • Revision ID: grantw@unimelb.edu.au-20100728041305-xwypm3cn1l1mnki1
Port from cjson to (simple)json.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
import urllib
82
82
import locale
83
83
 
84
 
import cjson
 
84
try:
 
85
    import json
 
86
except ImportError:
 
87
    import simplejson as json
85
88
 
86
89
import ivle.fileservice_lib.action
87
90
import ivle.fileservice_lib.listing
120
123
 
121
124
    if out:
122
125
        req.content_type = 'application/json'
123
 
        req.write(cjson.encode(out))
 
126
        req.write(json.dumps(out))
124
127
    else:
125
128
        return_type = fields.getfirst('return')
126
129
        ivle.fileservice_lib.listing.handle_return(req,