summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorEthan McCreadie <ethan.mccreadie@gopuff.com>2018-11-01 10:47:34 -0400
committerEthan McCreadie <ethan.mccreadie@gopuff.com>2018-11-01 10:47:34 -0400
commitdd44ed27eb832065760935b1028d68937d74b308 (patch)
treee91b10747421b4b6bb4bb794cc2d2d0543efb462 /cmd2/cmd2.py
parentce269173279e2f0560ca50b9e57ff4a089eb7fca (diff)
downloadcmd2-git-dd44ed27eb832065760935b1028d68937d74b308.tar.gz
Remove elif: decolorized_write already handles it
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 16d52194..6f9350c6 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -703,11 +703,8 @@ class Cmd(cmd.Cmd):
else:
break
self.pipe_proc = None
- elif self.redirecting and self.colors.lower() in (constants.COLORS_NEVER.lower(),
- constants.COLORS_TERMINAL.lower()):
- self.decolorized_write(self.stdout, msg_str)
else:
- self.stdout.write(msg_str)
+ self.decolorized_write(self.stdout, msg_str)
except BrokenPipeError:
# This occurs if a command's output is being piped to another process and that process closes before the
# command is finished. If you would like your application to print a warning message, then set the