summaryrefslogtreecommitdiff
path: root/cmd2
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2020-04-13 02:24:33 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2020-04-13 02:24:33 -0400
commitb29a2bde32b5f59c29df52809d306df06aadfa9e (patch)
treebc4beaf99dcb0c49c9d836135ae2954ebd48dd15 /cmd2
parente7314ef1daea68c08c979a99f4dbf7d58db03af4 (diff)
downloadcmd2-git-b29a2bde32b5f59c29df52809d306df06aadfa9e.tar.gz
Removed exception handling around tempfile.TemporaryFile()
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