]> granicus.if.org Git - python/commitdiff
asyncio.unix_events: Move import statement to match code in tulip
authorYury Selivanov <yselivanov@sprymix.com>
Thu, 25 Sep 2014 03:22:26 +0000 (23:22 -0400)
committerYury Selivanov <yselivanov@sprymix.com>
Thu, 25 Sep 2014 03:22:26 +0000 (23:22 -0400)
Lib/asyncio/unix_events.py

index 335a77d1bd5d01f60ac09cea1553be1079dc7749..93c8c1c8197d95e45050a03b15a0705ec087f1f3 100644 (file)
@@ -262,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