dabo Commit
Revision 4290
Date: 2008-07-16 14:53:20 -0700 (Wed, 16 Jul 2008)
Author: Nate
Trac: http://svn.dabodev.com/trac/dabo/changeset/4290

Changed:
U   trunk/dabo/ui/uiwx/dEditor.py

Log:
When getting a callTip and doing object Introspection, we were catching the 
wrong error.

Ed eliminated the try/except block for docLines but we need it to prevent and 
AttributeError from being thrown.

Diff:
Modified: trunk/dabo/ui/uiwx/dEditor.py
===================================================================
--- trunk/dabo/ui/uiwx/dEditor.py       2008-07-16 20:56:01 UTC (rev 4289)
+++ trunk/dabo/ui/uiwx/dEditor.py       2008-07-16 21:53:20 UTC (rev 4290)
@@ -1161,7 +1161,7 @@
                                if sarg is not None and sarg == "self":
                                        del args[0][0]
                                args = inspect.formatargspec(args[0], args[1], 
args[2], args[3])
-                       except IndexError:
+                       except TypeError:
                                args = ""
 
                        if inspect.ismethod(obj):
@@ -1178,7 +1178,10 @@
                                funcType = ""
 
                        doc = ""
-                       docLines = obj.__doc__.splitlines()
+                       try:
+                               docLines = obj.__doc__.splitlines()
+                       except AttributeError:
+                               docLines = []
                        for line in docLines:
                                doc += line.strip() + "\n"       ## must be \n 
on all platforms
                        doc = doc.strip()  ## Remove trailing blank line




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to