##// END OF EJS Templates
templatefilters: raise ProgrammingError if unencodable type passed to json()...
Yuya Nishihara -
r37247:63144f33 default
parent child Browse files
Show More
@@ -263,8 +263,7 b' def json(obj, paranoid=True):'
263 263 elif util.safehasattr(obj, '__iter__'):
264 264 out = [json(i, paranoid) for i in obj]
265 265 return '[' + ', '.join(out) + ']'
266 else:
267 raise TypeError('cannot encode type %s' % obj.__class__.__name__)
266 raise error.ProgrammingError('cannot encode %r' % obj)
268 267
269 268 @templatefilter('lower', intype=bytes)
270 269 def lower(text):
General Comments 0
You need to be logged in to leave comments. Login now