mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
resolve issue \#1172: don't divide by zero
This commit is contained in:
parent
83b061f7d5
commit
f139a7d282
@ -15,8 +15,8 @@
|
||||
import sys
|
||||
from os import path
|
||||
|
||||
__version__ = '1.2b1'
|
||||
__released__ = '1.2b1' # used when Sphinx builds its own docs
|
||||
__version__ = '1.2b1-xgen1-'
|
||||
__released__ = '1.2b1-xgen1-' # used when Sphinx builds its own docs
|
||||
|
||||
package_dir = path.abspath(path.dirname(__file__))
|
||||
|
||||
|
@ -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