Handle repr_html errors.

This commit is contained in:
David Bau
2022-03-23 20:58:53 -04:00
parent 2746be84ec
commit 110e7e770d
+4 -1
View File
@@ -256,7 +256,10 @@ def render_html(obj, out):
'''
Use _repr_html_() when available and non-None.
'''
h = obj._repr_html_()
try:
h = obj._repr_html_()
except:
return False
if h is None:
return False
out.append(h)