mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-22 09:45:26 +01:00
Dont import winutil in calibre.__init__
This commit is contained in:
parent
79dfb222ab
commit
ad2e6ded83
2 changed files with 4 additions and 5 deletions
|
|
@ -19,13 +19,13 @@
|
|||
from calibre.constants import (iswindows, ismacos, islinux, isfrozen,
|
||||
isbsd, preferred_encoding, __appname__, __version__, __author__,
|
||||
fcntl, plugins, filesystem_encoding, config_dir)
|
||||
from calibre.startup import winutil
|
||||
from calibre.startup import get_debug_executable
|
||||
from calibre.utils.icu import safe_chr
|
||||
from calibre.prints import prints
|
||||
|
||||
if False:
|
||||
# Prevent pyflakes from complaining
|
||||
winutil, __appname__, islinux, __version__
|
||||
get_debug_executable, __appname__, islinux, __version__
|
||||
fcntl, isfrozen, __author__, isbsd, config_dir, plugins
|
||||
|
||||
_mt_inited = False
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
from calibre.constants import iswindows, preferred_encoding, plugins, ismacos, islinux, DEBUG, isfreebsd
|
||||
|
||||
_run_once = False
|
||||
winutil = winutilerror = None
|
||||
|
||||
|
||||
def get_debug_executable():
|
||||
|
|
@ -69,7 +68,7 @@ def get_debug_executable():
|
|||
# Ensure that the max number of open files is at least 1024
|
||||
if iswindows:
|
||||
# See https://msdn.microsoft.com/en-us/library/6e3b887c.aspx
|
||||
if hasattr(winutil, 'setmaxstdio'):
|
||||
from calibre_extensions import winutil
|
||||
winutil.setmaxstdio(max(1024, winutil.getmaxstdio()))
|
||||
else:
|
||||
import resource
|
||||
|
|
|
|||
Loading…
Reference in a new issue