TypeError fix for unexpected NoneType in list
FIX: TypeError: unsupported operand type(s) for +: 'int' and 'NoneType' Caused when the "finished" list is summed with the function "sum".
This commit is contained in:
parent
22210ca352
commit
10a4ccba0a
|
@ -1656,7 +1656,8 @@ class Speedtest(object):
|
|||
while _is_alive(thread):
|
||||
thread.join(timeout=0.001)
|
||||
in_flight['threads'] -= 1
|
||||
finished.append(thread.result)
|
||||
if type(thread.result) in (int, float):
|
||||
finished.append(thread.result)
|
||||
callback(thread.i, request_count, end=True)
|
||||
|
||||
q = Queue(threads or self.config['threads']['upload'])
|
||||
|
|
Loading…
Reference in New Issue