We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18ba635 commit d774539Copy full SHA for d774539
fire/core.py
@@ -247,7 +247,7 @@ def _PrintResult(component_trace, verbose=False):
247
if hasattr(result, '__str__'):
248
# If the object has a custom __str__ method, rather than one inherited from
249
# object, then we use that to serialize the object.
250
- class_attrs = completion.GetClassAttrsDict(type(result))
+ class_attrs = completion.GetClassAttrsDict(type(result)) or {}
251
str_attr = class_attrs.get('__str__')
252
if str_attr and str_attr.defining_class is not object:
253
print(str(result))
0 commit comments