Commit e7a1eb04 authored by Denis Bilenko's avatar Denis Bilenko

ignore IOError from signal() (that happens on windows where signals don't work)

parent 338d177b
......@@ -153,7 +153,10 @@ class Hub(greenlet):
def run(self):
global _threadlocal
assert self is getcurrent(), 'Do not call run() directly'
self.keyboard_interrupt_signal = signal(2, core.active_event, MAIN.throw, KeyboardInterrupt)
try:
self.keyboard_interrupt_signal = signal(2, core.active_event, MAIN.throw, KeyboardInterrupt)
except IOError:
pass # no signal() on windows
try:
loop_count = 0
while True:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment