diff options
author | garen <garen@tychoish.com> | 2013-06-10 21:28:48 -0400 |
---|---|---|
committer | garen <garen@tychoish.com> | 2013-06-10 21:28:48 -0400 |
commit | eaabd62a881dd4d5b943e58483d74b7ec6dccb76 (patch) | |
tree | b26284d092a375fe9c34c187f8e807c300b9211b /sphinx/builders | |
parent | e3a1f6e268b7d15d0af23e0ef69516eff73fa764 (diff) | |
download | sphinx-eaabd62a881dd4d5b943e58483d74b7ec6dccb76.tar.gz |
resolve issue \#1172: don't divide by zero
Diffstat (limited to 'sphinx/builders')
-rw-r--r-- | sphinx/builders/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sphinx/builders/__init__.py b/sphinx/builders/__init__.py index 3ff5a161..026cbdb7 100644 --- a/sphinx/builders/__init__.py +++ b/sphinx/builders/__init__.py @@ -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 |