changeset 37230 | 63144f33c8bb |
parent 37229 | 05db42732fce |
child 37948 | a25513263075 |
--- a/mercurial/templatefilters.py Sun Mar 18 16:47:44 2018 +0900 +++ b/mercurial/templatefilters.py Sun Mar 18 16:53:08 2018 +0900 @@ -263,8 +263,7 @@ elif util.safehasattr(obj, '__iter__'): out = [json(i, paranoid) for i in obj] return '[' + ', '.join(out) + ']' - else: - raise TypeError('cannot encode type %s' % obj.__class__.__name__) + raise error.ProgrammingError('cannot encode %r' % obj) @templatefilter('lower', intype=bytes) def lower(text):