From 5a42d39b3963a66aad9f052b887b47370d8b2d6d Mon Sep 17 00:00:00 2001 From: Alex Ward Date: Tue, 15 May 2018 13:11:25 +0100 Subject: [PATCH] automatically call get_best_server --- speedtest.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/speedtest.py b/speedtest.py index 7a99c99..659efd8 100755 --- a/speedtest.py +++ b/speedtest.py @@ -341,10 +341,6 @@ class SpeedtestBestServerFailure(SpeedtestException): """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, source_address=None): """Connect to *address* and return the socket object. @@ -1041,10 +1037,7 @@ class Speedtest(object): @property def best(self): if not self._best: - raise SpeedtestMissingBestServer( - 'get_best_server not called or not able to determine best ' - 'server' - ) + self.get_best_server() return self._best def get_config(self):