Wrap reads in pmonitor() for python3

This commit is contained in:
Bob Lantz
2018-07-25 19:44:45 -07:00
parent 2283bb01e6
commit 356b024d6b
+2 -2
View File
@@ -422,9 +422,9 @@ def pmonitor(popens, timeoutms=500, readline=True,
if readline:
# Attempt to read a line of output
# This blocks until we receive a newline!
line = popen.stdout.readline()
line = decode( popen.stdout.readline() )
else:
line = popen.stdout.read( readmax )
line = decode( popen.stdout.read( readmax ) )
yield host, line
# Check for EOF
elif event & POLLHUP: