Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b78b56d

Browse files
committed
Update for an Issue #287 regarding read_output returning values
1 parent 76eb894 commit b78b56d

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

lib/utils/xmlrpc.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,13 @@ def is_busy(self):
5454
return kb.get("busyFlag")
5555

5656
def read_output(self):
57-
retval = []
58-
for _ in ("stdout", "stderr"):
59-
stream = getattr(sys, _)
60-
stream.seek(0)
61-
retval.append(stream.read())
62-
stream.truncate(0)
63-
if not filter(None, retval) and not self.is_busy():
57+
sys.stdout.seek(0)
58+
retval = sys.stdout.read()
59+
sys.stdout.truncate(0)
60+
61+
if not retval and not self.is_busy():
6462
retval = None
63+
6564
return retval
6665

6766
def run(self):

0 commit comments

Comments
 (0)