From 519a8af2fa297e98515ecbe61ab0ce2f04796f00 Mon Sep 17 00:00:00 2001 From: "Patrick K. O'Brien" Date: Mon, 19 May 2003 21:41:24 +0000 Subject: [PATCH] Protect against inspect.getdoc() failing. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wxPython/py/introspect.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wxPython/wxPython/py/introspect.py b/wxPython/wxPython/py/introspect.py index 5c02dc624c..3bdff3a460 100644 --- a/wxPython/wxPython/py/introspect.py +++ b/wxPython/wxPython/py/introspect.py @@ -174,7 +174,10 @@ def getCallTip(command='', locals=None): tip1 = name + argspec doc = '' if callable(object): - doc = inspect.getdoc(object) + try: + doc = inspect.getdoc(object) + except: + pass if doc: # tip2 is the first separated line of the docstring, like: # "Return call tip text for a command."