--server option wasn't working

This commit is contained in:
Andrew Molyneux 2013-07-28 20:01:24 +01:00
parent f42e98f29f
commit c6d62f8fc2

View File

@ -401,6 +401,7 @@ def speedtest():
if not args.simple:
print_('Testing from %(isp)s (%(ip)s)...' % config['client'])
best = None
if args.server:
try:
best = getBestServer(filter(lambda x: x['id'] == args.server,
@ -442,7 +443,8 @@ def speedtest():
else:
if not args.simple:
print_('Selecting best server based on ping...')
best = getBestServer(servers)
if best is None:
best = getBestServer(servers)
if not args.simple:
print_('Hosted by %(sponsor)s (%(name)s) [%(d)0.2f km]: '