diff options
author | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-03-18 12:28:35 +0100 |
---|---|---|
committer | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-03-18 12:28:35 +0100 |
commit | b6af467d7354c12b1e7fd535d09fe5157685a0d7 (patch) | |
tree | 2c43227330670fe22476d4d349bf5210bab8007f /paste/util | |
parent | 98932ed2af56e8b563fc96146d1ad7f2f7c6519b (diff) | |
download | paste-b6af467d7354c12b1e7fd535d09fe5157685a0d7.tar.gz |
Python 3: Replace types.ClassType with six.class_types
Diffstat (limited to 'paste/util')
-rw-r--r-- | paste/util/killthread.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/paste/util/killthread.py b/paste/util/killthread.py index f1fc93f..4df4f42 100644 --- a/paste/util/killthread.py +++ b/paste/util/killthread.py @@ -1,7 +1,7 @@ """ Kill a thread, from http://sebulba.wikispaces.com/recipe+thread2 """ -import types +import six try: import ctypes except ImportError: @@ -16,7 +16,7 @@ def async_raise(tid, exctype): tid is the value given by thread.get_ident() (an integer). Raise SystemExit to kill a thread.""" - if not isinstance(exctype, (types.ClassType, type)): + if not isinstance(exctype, (six.class_types, type)): raise TypeError("Only types can be raised (not instances)") if not isinstance(tid, int): raise TypeError("tid must be an integer") |