Skip to content

Commit dd44ed2

Browse files
committed
Remove elif: decolorized_write already handles it
1 parent ce26917 commit dd44ed2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cmd2/cmd2.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -703,11 +703,8 @@ def ppaged(self, msg: str, end: str='\n', chop: bool=False) -> None:
703703
else:
704704
break
705705
self.pipe_proc = None
706-
elif self.redirecting and self.colors.lower() in (constants.COLORS_NEVER.lower(),
707-
constants.COLORS_TERMINAL.lower()):
708-
self.decolorized_write(self.stdout, msg_str)
709706
else:
710-
self.stdout.write(msg_str)
707+
self.decolorized_write(self.stdout, msg_str)
711708
except BrokenPipeError:
712709
# This occurs if a command's output is being piped to another process and that process closes before the
713710
# command is finished. If you would like your application to print a warning message, then set the

0 commit comments

Comments
 (0)