removed e, no None in IS_JSON

This commit is contained in:
mdipierro
2013-07-23 01:05:09 -05:00
parent 44985f0076
commit 2d59e86ab9
2 changed files with 2 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.6.0-development+timestamp.2013.07.22.14.51.29
Version 2.6.0-development+timestamp.2013.07.23.01.03.38
+1 -3
View File
@@ -351,14 +351,12 @@ class IS_JSON(Validator):
self.error_message = error_message
def __call__(self, value):
if value is None:
return None
try:
if self.native_json:
simplejson.loads(value) # raises error in case of malformed json
return (value, None) # the serialized value is not passed
return (simplejson.loads(value), None)
except JSONErrors, e:
except JSONErrors:
return (value, translate(self.error_message))
def formatter(self,value):