Submitter | Yuya Nishihara |
---|---|
Date | March 31, 2018, 1:49 a.m. |
Message ID | <bf00dda4a053a9dbf716.1522460978@mimosa> |
Download | mbox | patch |
Permalink | /patch/30047/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/mercurial/templatefilters.py b/mercurial/templatefilters.py --- a/mercurial/templatefilters.py +++ b/mercurial/templatefilters.py @@ -263,8 +263,7 @@ def json(obj, paranoid=True): 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):