From 356b024d6bf16631a65a42e0d9cfb66783d54813 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Thu, 12 Jul 2018 07:23:28 +0000 Subject: [PATCH] Wrap reads in pmonitor() for python3 --- mininet/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mininet/util.py b/mininet/util.py index 585e3af..42d2c04 100644 --- a/mininet/util.py +++ b/mininet/util.py @@ -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: