diff options
| -rwxr-xr-x | bin/gateway_ping_test.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/gateway_ping_test.py b/bin/gateway_ping_test.py index b6126cc..dc2e165 100755 --- a/bin/gateway_ping_test.py +++ b/bin/gateway_ping_test.py @@ -185,7 +185,8 @@ def ping(host, interface, count, deadline, verbose=False): if interface: command.append("-I{}".format(interface)) reg = re.compile( - r"(\d+) packets transmitted, (\d+) received, (\d+)% packet loss") + r"(\d+) packets transmitted, (\d+) received," + r".*([0-9]*\.?[0-9]*.)% packet loss") ping_summary = {'transmitted': 0, 'received': 0, 'pct_loss': 0} try: output = subprocess.check_output(command, universal_newlines=True) |
