File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1139,9 +1139,10 @@ def move_current_stdouterr_line_up(self):
11391139
11401140 def send_to_stdout (self , output ):
11411141 """Send unicode string to Repl stdout"""
1142- if not output : return
1142+ if not output :
1143+ return
11431144 lines = output .split ('\n ' )
1144- if output == len ( output ) * ' \n ' :
1145+ if all ( not line for line in lines ) :
11451146 # If the string consist only of newline characters,
11461147 # str.split returns one more empty strings.
11471148 lines = lines [:- 1 ]
@@ -1165,9 +1166,10 @@ def send_to_stderr(self, error):
11651166
11661167 Must be able to handle FmtStrs because interpreter pass in
11671168 tracebacks already formatted."""
1168- if not error : return
1169+ if not error :
1170+ return
11691171 lines = error .split ('\n ' )
1170- if error == len ( error ) * ' \n ' :
1172+ if all ( not line for line in lines ) :
11711173 # If the string consist only of newline characters,
11721174 # str.split returns one more empty strings.
11731175 lines = lines [:- 1 ]
You can’t perform that action at this time.
0 commit comments