# HG changeset patch # User Sylvain Thénault # Date 1287994690 -7200 # Node ID 4b9a785df0f7936d92cb833ec4cef3efda56bd67 # Parent e7ff604491b22ee7320af44d495b30f5203d0685 [web] proper error when no json module available diff -r e7ff604491b2 -r 4b9a785df0f7 web/__init__.py --- a/web/__init__.py Mon Oct 25 10:15:47 2010 +0200 +++ b/web/__init__.py Mon Oct 25 10:18:10 2010 +0200 @@ -30,7 +30,9 @@ from cubicweb.utils import json_dumps from cubicweb.uilib import eid_param -dumps = deprecated('[3.9] use cubicweb.utils.json_dumps instead of dumps')(json_dumps) +assert json_dumps is not None, 'no json module installed' +dumps = deprecated('[3.9] use cubicweb.utils.json_dumps instead of dumps')( + json_dumps) INTERNAL_FIELD_VALUE = '__cubicweb_internal_field__'