Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sivel/speedtest-cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Martz <matt@sivel.net>2021-04-08 16:44:32 +0300
committerMatt Martz <matt@sivel.net>2021-04-08 16:44:32 +0300
commitcadc68b5aef20f28648072cf07a8f155639b81dd (patch)
tree9f373996519c969ae2141efbdd967be9d2e777de
parentdb46af8bcd69dd468e57752551e2e344b28dbc91 (diff)
Handle case where ignoreids is empty or contains empty ids
-rwxr-xr-xspeedtest.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/speedtest.py b/speedtest.py
index 425f18c..a62a184 100755
--- a/speedtest.py
+++ b/speedtest.py
@@ -1174,9 +1174,9 @@ class Speedtest(object):
# times = get_attributes_by_tag_name(root, 'times')
client = get_attributes_by_tag_name(root, 'client')
- ignore_servers = list(
- map(int, server_config['ignoreids'].split(','))
- )
+ ignore_servers = [
+ int(i) for i in server_config['ignoreids'].split(',') if i
+ ]
ratio = int(upload['ratio'])
upload_max = int(upload['maxchunkcount'])