# HG changeset patch # User Daniel O'Connor # Date 1669684986 -37800 # Node ID 947fa4062b011c452d65eee47a973626a8bb0d7f # Parent 1a87c79cf103933472cff9ba0ea7183e9619fd42 Don't blow up if ping fails. diff -r 1a87c79cf103 -r 947fa4062b01 speedcheck.py --- a/speedcheck.py Mon Jul 04 13:18:58 2022 +0930 +++ b/speedcheck.py Tue Nov 29 11:53:06 2022 +1030 @@ -79,6 +79,7 @@ l = stdout.decode('ascii', 'ignore').split('\n') if len(l) != 6: print('Unable to parse ping line:', l) + return float('nan'), float('nan') xx, xx, xx, plossline, latline, xx = l ploss = re.match('.* received, ([0-9.]+)% packet loss', plossline) if ploss is not None: