diff options
author | Scott Maxwell <scott@codecobblers.com> | 2013-11-01 12:32:57 -0700 |
---|---|---|
committer | Scott Maxwell <scott@codecobblers.com> | 2013-11-01 12:32:57 -0700 |
commit | 7decda3297089b2b2e73bb9cd7e577f9b2cb2789 (patch) | |
tree | 115b5f0c3e32241d05b499b231715e15d6e0a82f /test.py | |
parent | 9662a7f779636f0328263a81cdeb76af25802970 (diff) |
Fix thread stop for Py3
Diffstat (limited to 'test.py')
-rwxr-xr-x | test.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -29,6 +29,7 @@ import unittest from optparse import OptionParser import paramiko import threading +from paramiko.py3compat import PY3 sys.path.append('tests') @@ -148,7 +149,10 @@ def main(): # TODO: make that not a problem, jeez for thread in threading.enumerate(): if thread is not threading.currentThread(): - thread._Thread__stop() + if PY3: + thread._stop() + else: + thread._Thread__stop() # Exit correctly if not result.wasSuccessful(): sys.exit(1) |