Updated speedtest-cli

Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
Marcin Woźniak 2021-05-19 00:23:34 +02:00
parent 4b8de442ab
commit 914bc33473
Signed by: y0rune
GPG Key ID: F204C385F57EB348
1 changed files with 9 additions and 5 deletions

View File

@ -36,7 +36,7 @@ except ImportError:
gzip = None
GZIP_BASE = object
__version__ = '2.1.2'
__version__ = '2.1.3'
class FakeShutdownEvent(object):
@ -817,6 +817,8 @@ class HTTPDownloader(threading.Thread):
f.close()
except IOError:
pass
except HTTP_ERRORS:
pass
class HTTPUploaderData(object):
@ -882,7 +884,7 @@ class HTTPUploader(threading.Thread):
self.request = request
self.request.data.start = self.starttime = start
self.size = size
self.result = None
self.result = 0
self.timeout = timeout
self.i = i
@ -917,6 +919,8 @@ class HTTPUploader(threading.Thread):
self.result = 0
except (IOError, SpeedtestUploadTimeout):
self.result = sum(self.request.data.total)
except HTTP_ERRORS:
self.result = 0
class SpeedtestResults(object):
@ -1170,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'])