mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merged in tychoish/sphinx (pull request #146)
resolve issue #1172: don't divide by zero
This commit is contained in:
commit
8818b9a0c4
@ -354,6 +354,8 @@ class Builder(object):
|
||||
# for the rest, determine how many documents to write in one go
|
||||
ndocs = len(docnames)
|
||||
chunksize = min(ndocs // nproc, 10)
|
||||
if chunksize == 0:
|
||||
chunksize = 1
|
||||
nchunks, rest = divmod(ndocs, chunksize)
|
||||
if rest:
|
||||
nchunks += 1
|
||||
|
Loading…
Reference in New Issue
Block a user