From eb2c96bd477bd12262bf7ae5ed9509c0bb4a740b Mon Sep 17 00:00:00 2001 From: Parth Verma Date: Thu, 18 Jan 2018 19:24:43 +0530 Subject: [PATCH] Fixed syntax issue in py24 --- speedtest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/speedtest.py b/speedtest.py index bf6f841..91872d2 100755 --- a/speedtest.py +++ b/speedtest.py @@ -1321,7 +1321,11 @@ def validate_optional_args(args): def format_speed(speed_bytes_per_second, unit): - base = 1024 if unit[0] == 'byte' else 1000 + if unit[0] == 'byte': + base = 1024 + else: + base = 1000 + seq = ['', 'K', 'M', 'G'] i = 0 speed = speed_bytes_per_second / unit[1]