Skip to content

Commit f0ca805

Browse files
Attila Szöllősisebastinas
Attila Szöllősi
authored andcommitted
Fix test failure
1 parent ef91741 commit f0ca805

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bpython/curtsiesfrontend/replpainter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ def display_linize(msg, columns, blank_line=False):
2727
Warning: if msg is empty, returns an empty list of lines"""
2828
msg = fmtstr(msg)
2929
try:
30-
display_lines = [msg.width_aware_slice(slice(start, end))
30+
display_lines = ([msg.width_aware_slice(slice(start, end))
3131
for start, end in zip(
3232
range(0, msg.width, columns),
3333
range(columns, msg.width + columns, columns))]
34+
if msg else ([''] if blank_line else []))
3435
except ValueError:
35-
display_lines = ([''] if blank_line else [])
36+
display_lines = ['']
3637
return display_lines
3738

3839

0 commit comments

Comments
 (0)