summaryrefslogtreecommitdiff
path: root/cmd2
diff options
context:
space:
mode:
Diffstat (limited to 'cmd2')
-rw-r--r--cmd2/cmd2.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 17735d01..e0c28941 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -1976,11 +1976,7 @@ class Cmd(cmd.Cmd):
# Redirecting to a paste buffer
else:
- try:
- new_stdout = tempfile.TemporaryFile(mode="w+")
- except OSError as ex:
- raise RedirectionError('Failed to redirect because - {}'.format(ex))
-
+ new_stdout = tempfile.TemporaryFile(mode="w+")
redir_saved_state.redirecting = True
sys.stdout = self.stdout = new_stdout