summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2019-10-19 18:00:23 +0200
committerClaude Paroz <claude@2xlibre.net>2019-10-19 18:00:47 +0200
commit78b483d39e5d5e26814eeed5f4417c4bcbd15c97 (patch)
tree98cf245dfb13b156e048f511dbf02cf558a45076 /src
parent8f09789d4095245bbf43e3de0baeda92262085c4 (diff)
downloadtablib-78b483d39e5d5e26814eeed5f4417c4bcbd15c97.tar.gz
Fixes #368 - Avoid crashing when exporting empty string in ReST
Diffstat (limited to 'src')
-rw-r--r--src/tablib/formats/_rst.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tablib/formats/_rst.py b/src/tablib/formats/_rst.py
index 27151a3..8b5cfa0 100644
--- a/src/tablib/formats/_rst.py
+++ b/src/tablib/formats/_rst.py
@@ -34,7 +34,7 @@ def _max_word_len(text):
8
"""
- return max((len(word) for word in text.split()))
+ return max((len(word) for word in text.split())) if text else 0
def _get_column_string_lengths(dataset):