New exception style.

This commit is contained in:
Kenneth Reitz
2010-10-06 12:48:43 -04:00
parent b2c35c2543
commit 143677be77
+2 -1
View File
@@ -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