Commits

dready  committed 4dc6ff2

python 2.5 compat (use simplejson if import json fails)

  • Participants
  • Parent commits d5b0b9a

Comments (0)

Files changed (2)

File src/factory/views.py

-import json
+try:
+    import json
+except ImportError:
+    import simplejson as json
 
 from django.core.urlresolvers import reverse
 from django.http import HttpResponse
         json_string = json.dumps(d)
     else:
         json_string = json.dumps(False)
-    return HttpResponse(json_string)
+    return HttpResponse(json_string)

File src/worker/run_worker.py

 import os
 import urllib2
-import json
+try:
+    import json
+except ImportError:
+    import simplejson as json
 import tarfile
 import time
 import logging