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

« back to all changes in this revision

Viewing changes to ivle/webapp/filesystem/svnlog/__init__.py

  • Committer: William Grant
  • Date: 2010-07-20 04:52:31 UTC
  • mto: This revision was merged to the branch mainline in revision 1826.
  • Revision ID: grantw@unimelb.edu.au-20100720045231-8ia3uk8nao8zdq1i
Replace cjson with json, or simplejson if json is not available (Python <2.6)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
import os
21
21
 
22
 
import cjson
 
22
try:
 
23
    import json
 
24
except ImportError:
 
25
    import simplejson as json
 
26
 
23
27
import pysvn
24
28
 
25
29
import ivle.date
62
66
                                                )
63
67
        assert not err
64
68
 
65
 
        response = cjson.decode(out)
 
69
        response = json.loads(out)
66
70
        if 'error' in response:
67
71
            if response['error'] == 'notfound':
68
72
                raise NotFound()