summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xtest.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test.py b/test.py
index 1162da07..c8ac6bc3 100755
--- a/test.py
+++ b/test.py
@@ -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)