]> sourceware.org Git - lvm2.git/commitdiff
lvmdbusd: Call readlines instead of readline
authorTony Asleson <tasleson@redhat.com>
Thu, 8 Sep 2022 20:42:26 +0000 (15:42 -0500)
committerTony Asleson <tasleson@redhat.com>
Fri, 16 Sep 2022 15:49:37 +0000 (10:49 -0500)
Better to drain everything we have now that our IO is line orientated
when using a ptty.

daemons/lvmdbusd/lvm_shell_proxy.py.in

index ed2c7bc9e76f850e42624405a306c3efba10c6f1..0ba0ffe5c1dd8eebf7de42bdc1d19a2445efd628 100755 (executable)
@@ -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:
This page took 0.031127 seconds and 5 git commands to generate.