From 7dc327b60206a890c0f97030cc74f09b47286a5e Mon Sep 17 00:00:00 2001 From: Nigel Bowden Date: Sat, 29 Aug 2020 18:00:02 +0100 Subject: [PATCH] Added strip() to tidy up speedtest result --- BakeBit/Software/Python/modules/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BakeBit/Software/Python/modules/utils.py b/BakeBit/Software/Python/modules/utils.py index d43fd36..7b5db17 100644 --- a/BakeBit/Software/Python/modules/utils.py +++ b/BakeBit/Software/Python/modules/utils.py @@ -36,7 +36,7 @@ def show_speedtest(self, g_vars): speedtest_cmd = "speedtest | egrep -w \"Testing from|Download|Upload\" | sed -r 's/Testing from.*?\(/My IP: /g; s/\)\.\.\.//g; s/Download/D/g; s/Upload/U/g; s/bit\/s/bps/g'" try: - speedtest_output = subprocess.check_output(speedtest_cmd, shell=True).decode() + speedtest_output = subprocess.check_output(speedtest_cmd, shell=True).decode().strip() speedtest_info = speedtest_output.split('\n') except subprocess.CalledProcessError as exc: output = exc.output.decode()