From: Yury Selivanov <yselivanov@sprymix.com>
Date: Thu, 25 Sep 2014 03:21:39 +0000 (-0400)
Subject: asyncio.unix_events: Move import statement to match tulip code
X-Git-Tag: v3.5.0a1~855^2
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8c0e0ab767f0d6f8395d8c317b08977563b70d41;p=python

asyncio.unix_events: Move import statement to match tulip code
---

diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
index 37310cfde8..93c8c1c819 100644
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/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