Wrap reads in pmonitor() for python3
This commit is contained in:
+2
-2
@@ -422,9 +422,9 @@ def pmonitor(popens, timeoutms=500, readline=True,
|
|||||||
if readline:
|
if readline:
|
||||||
# Attempt to read a line of output
|
# Attempt to read a line of output
|
||||||
# This blocks until we receive a newline!
|
# This blocks until we receive a newline!
|
||||||
line = popen.stdout.readline()
|
line = decode( popen.stdout.readline() )
|
||||||
else:
|
else:
|
||||||
line = popen.stdout.read( readmax )
|
line = decode( popen.stdout.read( readmax ) )
|
||||||
yield host, line
|
yield host, line
|
||||||
# Check for EOF
|
# Check for EOF
|
||||||
elif event & POLLHUP:
|
elif event & POLLHUP:
|
||||||
|
|||||||
Reference in New Issue
Block a user