Permalink
Browse files

don't use it under win32

  • Loading branch information...
1 parent 7292b4a commit 70130eb9313c8feef06d5d4fdd569b014b0f859f @tarekziade tarekziade committed Feb 26, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 vaurien/run.py
View
@@ -1,4 +1,3 @@
-import fcntl
import argparse
import sys
import logging
@@ -27,6 +26,11 @@ def write(self, msg):
def close_on_exec(fd):
+ try:
+ import fcntl
+ except ImportError:
+ return
+
flags = fcntl.fcntl(fd, fcntl.F_GETFD)
flags |= fcntl.FD_CLOEXEC
fcntl.fcntl(fd, fcntl.F_SETFD, flags)

0 comments on commit 70130eb

Please sign in to comment.