Skip to content

Commit 37bcb33

Browse files
committed
fix(misc): syntax;
- TypeError fix.
1 parent 19b87fc commit 37bcb33

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ckanext/recombinant/write_excel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,15 @@ def estimate_width_from_length(length):
250250
range2 * ESTIMATE_WIDTH_MULTIPLE_2)
251251

252252
def estimate_width(text):
253-
return max(estimate_width_from_length(len(s)) for s in text.split('\n'))
253+
return max(estimate_width_from_length(len(s)) for s in str(text).split('\n'))
254254

255255
def wrap_text_to_width(text, width):
256256
# assuming width > ESTIMATE_WIDTH_MULTIPLE_1_CHARS
257257
width -= ESTIMATE_WIDTH_MULTIPLE_1_CHARS * ESTIMATE_WIDTH_MULTIPLE_1
258258
cwidth = width // ESTIMATE_WIDTH_MULTIPLE_2 + ESTIMATE_WIDTH_MULTIPLE_1_CHARS
259259
return '\n'.join(
260260
'\n'.join(textwrap.wrap(line, cwidth))
261-
for line in text.split('\n'))
261+
for line in str(text).split('\n'))
262262

263263

264264
def _build_styles(book, geno):

0 commit comments

Comments
 (0)