specify a lighthouse server
This commit is contained in:
parent
9fedf14e55
commit
e8d04b1921
1 changed files with 3 additions and 3 deletions
|
@ -2,14 +2,14 @@ import logging
|
||||||
import random
|
import random
|
||||||
from txjsonrpc.web.jsonrpc import Proxy
|
from txjsonrpc.web.jsonrpc import Proxy
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
from lbrynet.conf import SEARCH_SERVERS
|
from lbrynet.conf import SEARCH_SERVERS
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class LighthouseClient(object):
|
class LighthouseClient(object):
|
||||||
def __init__(self):
|
def __init__(self, servers=None):
|
||||||
self.servers = SEARCH_SERVERS
|
self.servers = servers or SEARCH_SERVERS
|
||||||
|
|
||||||
def _get_random_server(self):
|
def _get_random_server(self):
|
||||||
return Proxy(random.choice(self.servers))
|
return Proxy(random.choice(self.servers))
|
||||||
|
|
Loading…
Reference in a new issue