automatically call get_best_server
This commit is contained in:
parent
72ed585c6f
commit
5a42d39b39
|
@ -341,10 +341,6 @@ class SpeedtestBestServerFailure(SpeedtestException):
|
||||||
"""Unable to determine best server"""
|
"""Unable to determine best server"""
|
||||||
|
|
||||||
|
|
||||||
class SpeedtestMissingBestServer(SpeedtestException):
|
|
||||||
"""get_best_server not called or not able to determine best server"""
|
|
||||||
|
|
||||||
|
|
||||||
def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
|
def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
|
||||||
source_address=None):
|
source_address=None):
|
||||||
"""Connect to *address* and return the socket object.
|
"""Connect to *address* and return the socket object.
|
||||||
|
@ -1041,10 +1037,7 @@ class Speedtest(object):
|
||||||
@property
|
@property
|
||||||
def best(self):
|
def best(self):
|
||||||
if not self._best:
|
if not self._best:
|
||||||
raise SpeedtestMissingBestServer(
|
self.get_best_server()
|
||||||
'get_best_server not called or not able to determine best '
|
|
||||||
'server'
|
|
||||||
)
|
|
||||||
return self._best
|
return self._best
|
||||||
|
|
||||||
def get_config(self):
|
def get_config(self):
|
||||||
|
|
Loading…
Reference in New Issue