Commits

Rune Halvorsen committed 9c62cb8

Raise our own ImportError if all fails. Looks better than to complain about
django when that happens

Comments (0)

Files changed (1)

             serialize = json.dumps
             deserialize = json.loads
         except ImportError:
-            # If all of the above fails, try to fallback to the simplejson
-            # embedded in Django.
-            from django.utils import simplejson
-            serialize = simplejson.dumps
-            deserialize = simplejson.loads
+            try:
+                # If all of the above fails, try to fallback to the simplejson
+                # embedded in Django.
+                from django.utils import simplejson
+                serialize = simplejson.dumps
+                deserialize = simplejson.loads
+            except:
+                raise ImportError("No json module found")
+