File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -49,10 +49,10 @@ def exit_from_event_loop_thread(
49
49
if not stop .done ():
50
50
# When exiting the thread that runs the event loop, raise
51
51
# KeyboardInterrupt in the main thread to exit the program.
52
- try :
53
- ctrl_c = signal .CTRL_C_EVENT # Windows
54
- except AttributeError :
55
- ctrl_c = signal .SIGINT # POSIX
52
+ if sys . platform == "win32" :
53
+ ctrl_c = signal .CTRL_C_EVENT
54
+ else :
55
+ ctrl_c = signal .SIGINT
56
56
os .kill (os .getpid (), ctrl_c )
57
57
58
58
Original file line number Diff line number Diff line change 14
14
"""
15
15
# Remove try / except when dropping support for Python < 3.7
16
16
try :
17
- Data .__doc__ = Data__doc__ # type: ignore
17
+ Data .__doc__ = Data__doc__
18
18
except AttributeError : # pragma: no cover
19
19
pass
20
20
31
31
32
32
ExtensionParameter__doc__ = """Parameter of a WebSocket extension"""
33
33
try :
34
- ExtensionParameter .__doc__ = ExtensionParameter__doc__ # type: ignore
34
+ ExtensionParameter .__doc__ = ExtensionParameter__doc__
35
35
except AttributeError : # pragma: no cover
36
36
pass
37
37
40
40
41
41
ExtensionHeader__doc__ = """Item parsed in a Sec-WebSocket-Extensions header"""
42
42
try :
43
- ExtensionHeader .__doc__ = ExtensionHeader__doc__ # type: ignore
43
+ ExtensionHeader .__doc__ = ExtensionHeader__doc__
44
44
except AttributeError : # pragma: no cover
45
45
pass
46
46
You can’t perform that action at this time.
0 commit comments