asyncio.unix_events: Move import statement to match tulip code
This commit is contained in:
parent
efd713b82b
commit
8c0e0ab767
|
@ -1,7 +1,6 @@
|
||||||
"""Selector event loop for Unix with signal handling."""
|
"""Selector event loop for Unix with signal handling."""
|
||||||
|
|
||||||
import errno
|
import errno
|
||||||
import fcntl
|
|
||||||
import os
|
import os
|
||||||
import signal
|
import signal
|
||||||
import socket
|
import socket
|
||||||
|
@ -263,6 +262,8 @@ if hasattr(os, 'set_blocking'):
|
||||||
def _set_nonblocking(fd):
|
def _set_nonblocking(fd):
|
||||||
os.set_blocking(fd, False)
|
os.set_blocking(fd, False)
|
||||||
else:
|
else:
|
||||||
|
import fcntl
|
||||||
|
|
||||||
def _set_nonblocking(fd):
|
def _set_nonblocking(fd):
|
||||||
flags = fcntl.fcntl(fd, fcntl.F_GETFL)
|
flags = fcntl.fcntl(fd, fcntl.F_GETFL)
|
||||||
flags = flags | os.O_NONBLOCK
|
flags = flags | os.O_NONBLOCK
|
||||||
|
|
Loading…
Reference in New Issue