From aa1f270151d6c4f4089960ead052830aa3572e2d Mon Sep 17 00:00:00 2001 From: Adrian McCarthy Date: Thu, 14 Jan 2016 22:52:16 +0000 Subject: Fix detection of teardown hooks that are already bound. llvm-svn: 257829 --- lldb/packages/Python/lldbsuite/test/lldbtest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/packages/Python/lldbsuite/test/lldbtest.py') diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index 3ad6d29a1d7..3ea02277aa0 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -1647,7 +1647,7 @@ class Base(unittest2.TestCase): print("Executing tearDown hook:", getsource_if_available(hook), file=sbuf) import inspect hook_argc = len(inspect.getargspec(hook).args) - if hook_argc == 0 or getattr(hook,'im_self',None): + if hook_argc == 0 or (getattr(hook,'im_self',None) is not None) or (hasattr(hook, '__self__')): hook() elif hook_argc == 1: hook(self) -- cgit v1.2.3