mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
625e478ce0
commit
3bffc1a48c
@ -21,12 +21,6 @@ from calibre.constants import iswindows, preferred_encoding, plugins
|
|||||||
_run_once = False
|
_run_once = False
|
||||||
winutil = winutilerror = None
|
winutil = winutilerror = None
|
||||||
|
|
||||||
try:
|
|
||||||
import fcntl
|
|
||||||
except:
|
|
||||||
fcntl
|
|
||||||
fcntl = None
|
|
||||||
|
|
||||||
if not _run_once:
|
if not _run_once:
|
||||||
_run_once = True
|
_run_once = True
|
||||||
|
|
||||||
@ -146,6 +140,7 @@ if not _run_once:
|
|||||||
fd = os.open(name, flags)
|
fd = os.open(name, flags)
|
||||||
ans = os.fdopen(fd, mode, bufsize)
|
ans = os.fdopen(fd, mode, bufsize)
|
||||||
else:
|
else:
|
||||||
|
import fcntl
|
||||||
try:
|
try:
|
||||||
cloexec_flag = fcntl.FD_CLOEXEC
|
cloexec_flag = fcntl.FD_CLOEXEC
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user