Skip to content
This repository was archived by the owner on Apr 14, 2024. It is now read-only.

Commit 3f26b05

Browse files
committed
Merge pull request #8 from kevin-brown/issue_5
Python 2 / 3 compatibility
2 parents fc02456 + 339024b commit 3f26b05

10 files changed

+537
-508
lines changed

Diff for: async/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ def _init_atexit():
1111
import atexit
1212
from . import thread
1313
atexit.register(thread.do_terminate_threads)
14-
14+
1515
def _init_signals():
1616
"""Assure we shutdown our threads correctly when being interrupted"""
1717
import signal
1818
from . import thread
1919
import sys
20-
20+
2121
prev_handler = signal.getsignal(signal.SIGINT)
2222
def thread_interrupt_handler(signum, frame):
2323
thread.do_terminate_threads()
@@ -30,7 +30,7 @@ def thread_interrupt_handler(signum, frame):
3030
signal.signal(signal.SIGINT, thread_interrupt_handler)
3131
except ValueError:
3232
# happens if we don't try it from the main thread
33-
print("Failed to setup thread-interrupt handler. This is usually not critical", file=sys.stderr)
33+
sys.stderr.write("Failed to setup thread-interrupt handler. This is usually not critical")
3434
# END exception handling
3535

3636

0 commit comments

Comments
 (0)