From 143677be77d9deac237b92c15a20b87b8b164a2e Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Wed, 6 Oct 2010 12:48:43 -0400 Subject: [PATCH] New exception style. --- tablib/formats/_json.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tablib/formats/_json.py b/tablib/formats/_json.py index fbc3758..843da90 100644 --- a/tablib/formats/_json.py +++ b/tablib/formats/_json.py @@ -10,6 +10,7 @@ except ImportError: import tablib.core + title = 'json' extentions = ('json', 'jsn') @@ -47,5 +48,5 @@ def detect(stream): try: json.loads(stream) return True - except json.decoder.JSONDecodeError: + except ValueError: return False \ No newline at end of file