From: Kurt B. Kaiser Date: Mon, 20 Jan 2003 04:49:37 +0000 (+0000) Subject: ...and the old pyclbr.py faked Function instances with Class instances X-Git-Tag: v2.3c1~2395 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b743441a60640824360bdff15780fc5d40489d6;p=thirdparty%2FPython%2Fcpython.git ...and the old pyclbr.py faked Function instances with Class instances which had empty method and super attributes. ClassBrowser.IsExpandable() could not handle the missing attributes. SF Bug 667787. --- diff --git a/Lib/idlelib/ClassBrowser.py b/Lib/idlelib/ClassBrowser.py index 240394b68f46..82f51915d20e 100644 --- a/Lib/idlelib/ClassBrowser.py +++ b/Lib/idlelib/ClassBrowser.py @@ -143,7 +143,10 @@ class ClassBrowserTreeItem(TreeItem): def IsExpandable(self): if self.cl: - return not not self.cl.methods + try: + return not not self.cl.methods + except AttributeError: + return False def GetSubList(self): if not self.cl: