diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2014-09-24 23:23:19 -0400 |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2014-09-24 23:23:19 -0400 |
commit | 43e57b4cc53fc70a15cf1b56cd907f15ffd392c1 (patch) | |
tree | 492260d6e289d4a583ff65bb3518401a7f96efea | |
parent | 8469bb606d512650f89d07dbe2b91272f30ae907 (diff) | |
download | trollius-git-43e57b4cc53fc70a15cf1b56cd907f15ffd392c1.tar.gz |
unix_events: Move import statement to sync code with cpython
-rw-r--r-- | asyncio/unix_events.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/asyncio/unix_events.py b/asyncio/unix_events.py index 37310cf..93c8c1c 100644 --- a/asyncio/unix_events.py +++ b/asyncio/unix_events.py @@ -1,7 +1,6 @@ """Selector event loop for Unix with signal handling.""" import errno -import fcntl import os import signal import socket @@ -263,6 +262,8 @@ if hasattr(os, 'set_blocking'): def _set_nonblocking(fd): os.set_blocking(fd, False) else: + import fcntl + def _set_nonblocking(fd): flags = fcntl.fcntl(fd, fcntl.F_GETFL) flags = flags | os.O_NONBLOCK |