diff options
author | Georg Brandl <georg@python.org> | 2008-06-04 20:21:39 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-06-04 20:21:39 +0000 |
commit | 5cb01d68dc1df8ea3e89c45b2b2a40c20dda812b (patch) | |
tree | 71235ec4c2c3b41e25e90ed7863fdce8be540ac5 | |
parent | a7e992a46a76d95df5c892117e695c374e018c40 (diff) | |
download | sphinx-git-5cb01d68dc1df8ea3e89c45b2b2a40c20dda812b.tar.gz |
Fix 2.5ism in textwriter.
-rw-r--r-- | sphinx/textwriter.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sphinx/textwriter.py b/sphinx/textwriter.py index a8afdaa6c..e36361a00 100644 --- a/sphinx/textwriter.py +++ b/sphinx/textwriter.py @@ -305,7 +305,10 @@ class TextTranslator(nodes.NodeVisitor): cells = [] for i, cell in enumerate(line): par = textwrap.wrap(cell, width=colwidths[i]) - maxwidth = max(map(len, par)) if par else 0 + if par: + maxwidth = max(map(len, par)) + else: + maxwidth = 0 realwidths[i] = max(realwidths[i], maxwidth) cells.append(par) fmted_rows.append(cells) |