From 110e7e770d96107f5329e9db0c9703dd9752de37 Mon Sep 17 00:00:00 2001 From: David Bau Date: Wed, 23 Mar 2022 20:58:53 -0400 Subject: [PATCH] Handle repr_html errors. --- baukit/show.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/baukit/show.py b/baukit/show.py index b3a4870..013a83e 100644 --- a/baukit/show.py +++ b/baukit/show.py @@ -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)