summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2017-08-10 10:27:40 -0700
committerGitHub <noreply@github.com>2017-08-10 10:27:40 -0700
commitbdd06fbe6a6892d8115870a177150dc035cf602c (patch)
treefaa41502c16ed776aaaff49076a8198f9ce7b394 /cmd2.py
parentb319900f42704045424b89f031d9c381bf349e7e (diff)
parent3db44e5f5a552e2a2efee544b7ef5dd8d56f6c46 (diff)
downloadcmd2-git-0.7.6.tar.gz
Merge pull request #204 from python-cmd2/pipe_simplify0.7.6
The default buffer size is fine for 99% of pipe operations
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/cmd2.py b/cmd2.py
index 24130f32..c688be9d 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -545,11 +545,6 @@ class Cmd(cmd.Cmd):
# Used when piping command output to a shell command
self.pipe_proc = None
- # Size of the stdin/stdout buffers used when piping command output to a shell command via self.stdout.
- # This should be increased in cases where large amounts of data are expected to be piped to the shell
- # to prevent blocking when writing to self.stdout.
- self._pipe_buffer_size = io.DEFAULT_BUFFER_SIZE
-
# ----- Methods related to presenting output to the user -----
@property
@@ -816,9 +811,9 @@ class Cmd(cmd.Cmd):
# Open each side of the pipe and set stdout accordingly
# noinspection PyTypeChecker
- self.stdout = io.open(write_fd, write_mode, buffering=self._pipe_buffer_size)
+ self.stdout = io.open(write_fd, write_mode)
# noinspection PyTypeChecker
- subproc_stdin = io.open(read_fd, read_mode, buffering=self._pipe_buffer_size)
+ subproc_stdin = io.open(read_fd, read_mode)
# We want Popen to raise an exception if it fails to open the process. Thus we don't set shell to True.
try: