Show More
@@ -12,7 +12,7 b' def _async_raise(tid, exctype):' | |||||
12 | """raises the exception, performs cleanup if needed""" |
|
12 | """raises the exception, performs cleanup if needed""" | |
13 | if not inspect.isclass(exctype): |
|
13 | if not inspect.isclass(exctype): | |
14 | raise TypeError("Only types can be raised (not instances)") |
|
14 | raise TypeError("Only types can be raised (not instances)") | |
15 | res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, ctypes.py_object(exctype)) |
|
15 | res = ctypes.pythonapi.PyThreadState_SetAsyncExc(ctypes.c_long(tid), ctypes.py_object(exctype)) | |
16 | if res == 0: |
|
16 | if res == 0: | |
17 | raise ValueError("invalid thread id") |
|
17 | raise ValueError("invalid thread id") | |
18 | elif res != 1: |
|
18 | elif res != 1: |
General Comments 0
You need to be logged in to leave comments.
Login now