Skip to content

Commit

Permalink
Automatically resolve .best property (sivel#514)
Browse files Browse the repository at this point in the history
* automatically call get_best_server

* add back SpeedtestBestServerFailer exception
  • Loading branch information
alxwrd authored and sivel committed Dec 3, 2018
1 parent 72ed585 commit b2654de
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions speedtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,10 +1041,7 @@ def __init__(self, config=None, source_address=None, timeout=10,
@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):
Expand Down

0 comments on commit b2654de

Please sign in to comment.