# HG changeset patch # User Daniel O'Connor # Date 1605328507 -37800 # Node ID 815e6b61d76e545a1d265c6e0a7eb896e8e2cec0 # Parent b79c03810bbe5de7c163ec52e0c7a6c952a78eb1 Decode to string to work with Python 3. diff -r b79c03810bbe -r 815e6b61d76e speedcheck.py --- a/speedcheck.py Sat Nov 14 15:02:55 2020 +1030 +++ b/speedcheck.py Sat Nov 14 15:05:07 2020 +1030 @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 import configparser import optparse @@ -76,7 +76,7 @@ def testping(host): p = subprocess.Popen(['ping', '-c', '5', '-t', '8', '-q', host], stdout = subprocess.PIPE) stdout, stderr = p.communicate() - l = stdout.split('\n') + l = stdout.decode('ascii', 'ignore').split('\n') if len(l) != 6: print('Unable to parse ping line:', l) xx, xx, xx, plossline, latline, xx = l