summaryrefslogtreecommitdiff
path: root/daemons
diff options
context:
space:
mode:
authorTony Asleson <tasleson@redhat.com>2022-09-08 15:42:26 -0500
committerTony Asleson <tasleson@redhat.com>2022-09-16 10:49:37 -0500
commita4b7f988d88afa81fd8f1934482444f97a08d9dd (patch)
tree7b3a81dffb8d6c3ec0a56dc6c33a92e55bf1b087 /daemons
parent8e1e40c499a0e46a0a15b9a6b470adb8fbbbbf4f (diff)
downloadlvm2-a4b7f988d88afa81fd8f1934482444f97a08d9dd.tar.gz
lvmdbusd: Call readlines instead of readline
Better to drain everything we have now that our IO is line orientated when using a ptty.
Diffstat (limited to 'daemons')
-rwxr-xr-xdaemons/lvmdbusd/lvm_shell_proxy.py.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/daemons/lvmdbusd/lvm_shell_proxy.py.in b/daemons/lvmdbusd/lvm_shell_proxy.py.in
index ed2c7bc9e..0ba0ffe5c 100755
--- a/daemons/lvmdbusd/lvm_shell_proxy.py.in
+++ b/daemons/lvmdbusd/lvm_shell_proxy.py.in
@@ -69,11 +69,13 @@ class LVMShellProxy(object):
for r in ready[0]:
if r == self.parent_stdout_fd:
- stdout += self.parent_stdout.readline()
+ for line in self.parent_stdout.readlines():
+ stdout += line
elif r == self.report_stream.fileno():
report += read_decoded(self.report_stream)
elif r == self.parent_stderr_fd:
- stderr += self.parent_stderr.readline()
+ for line in self.parent_stderr.readlines():
+ stderr += line
# Check to see if the lvm process died on us
if self.lvm_shell.poll() is not None: