Remove use of sysconf since it isn't available on windows anyway

This commit is contained in:
Kovid Goyal 2010-09-30 15:31:39 -06:00
parent 6bd9287891
commit cb24b0312e

View File

@ -47,11 +47,6 @@ PARALLEL_FUNCS = {
('calibre.ebooks.metadata.worker', 'save_book', 'notification'),
}
try:
MAXFD = os.sysconf("SC_OPEN_MAX")
except:
MAXFD = 256
class Progress(Thread):
def __init__(self, conn):
@ -85,7 +80,7 @@ def main():
if iswindows:
# Close open file descriptors inherited from parent
# On Unix this is done by the subprocess module
os.closerange(3, MAXFD)
os.closerange(3, 256)
if isosx and 'CALIBRE_WORKER_ADDRESS' not in os.environ:
# On some OS X computers launchd apparently tries to
# launch the last run process from the bundle