Commits

Anonymous committed bf28d0f

Backport 1.63:

In both spilldata() functions, pretend that the docstring for
non-callable objects is always None. This makes for less confusing
output and fixes the problem reported in SF patch #550290.

Comments (0)

Files changed (1)

                 push(msg)
                 for name, kind, homecls, value in ok:
                     base = self.docother(getattr(object, name), name, mod)
-                    doc = getattr(value, "__doc__", None)
+                    if callable(value):
+                        doc = getattr(value, "__doc__", None)
+                    else:
+                        doc = None
                     if doc is None:
                         push('<dl><dt>%s</dl>\n' % base)
                     else:
                 hr.maybe()
                 push(msg)
                 for name, kind, homecls, value in ok:
-                    doc = getattr(value, "__doc__", None)
+                    if callable(value):
+                        doc = getattr(value, "__doc__", None)
+                    else:
+                        doc = None
                     push(self.docother(getattr(object, name),
                                        name, mod, 70, doc) + '\n')
             return attrs