mirror of
https://github.com/kennethreitz/tablib.git
synced 2026-06-05 23:10:17 +00:00
New exception style.
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user