Commit df91c908 authored by Romain Casati's avatar Romain Casati
Browse files

Fix format_repr in case of _repr_ function returning one.

parent 655fd37a
......@@ -56,7 +56,9 @@ def format_repr(obj):
for mime, _repr in mimes.items():
if hasattr(obj, _repr):
res[mime] = getattr(obj, _repr)()
representation = getattr(obj, _repr)()
if representation is not None:
res[mime] = representation
except Exception:
return res
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment