mirror of
https://github.com/wassname/baukit.git
synced 2026-06-27 19:46:31 +08:00
Handle repr_html errors.
This commit is contained in:
+4
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user