summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lldbtest.py
diff options
context:
space:
mode:
authorAdrian McCarthy <amccarth@google.com>2016-01-14 22:52:16 +0000
committerAdrian McCarthy <amccarth@google.com>2016-01-14 22:52:16 +0000
commitaa1f270151d6c4f4089960ead052830aa3572e2d (patch)
tree1cd936f14651140e98688050432ada453ed7382c /lldb/packages/Python/lldbsuite/test/lldbtest.py
parent9c92d67b78904ede7f0f71d31ff2aed3080f17b2 (diff)
downloadbcm5719-llvm-aa1f270151d6c4f4089960ead052830aa3572e2d.tar.gz
bcm5719-llvm-aa1f270151d6c4f4089960ead052830aa3572e2d.zip
Fix detection of teardown hooks that are already bound.
llvm-svn: 257829
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbtest.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbtest.py2
1 files changed, 1 insertions, 1 deletions
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)
OpenPOWER on IntegriCloud