forked from LBRYCommunity/lbry-sdk
pylint
This commit is contained in:
parent
c590954eb9
commit
89e395b5f4
1 changed files with 5 additions and 4 deletions
|
@ -2,7 +2,7 @@ import logging
|
||||||
import asyncio
|
import asyncio
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
from typing import Dict, Optional, Tuple
|
from typing import Dict, Optional, Tuple
|
||||||
from time import time, perf_counter
|
from time import perf_counter
|
||||||
|
|
||||||
from torba.rpc import RPCSession as BaseClientSession, Connector, RPCError
|
from torba.rpc import RPCSession as BaseClientSession, Connector, RPCError
|
||||||
|
|
||||||
|
@ -60,7 +60,8 @@ class ClientSession(BaseClientSession):
|
||||||
super().send_request(method, args), timeout=self.timeout
|
super().send_request(method, args), timeout=self.timeout
|
||||||
)
|
)
|
||||||
except RPCError as e:
|
except RPCError as e:
|
||||||
log.warning("Wallet server (%s:%i) returned an error. Code: %s Message: %s", *self.server, *e.args)
|
log.warning("Wallet server (%s:%i) returned an error. Code: %s Message: %s",
|
||||||
|
*self.server, *e.args)
|
||||||
raise e
|
raise e
|
||||||
finally:
|
finally:
|
||||||
self.pending_amount -= 1
|
self.pending_amount -= 1
|
||||||
|
@ -290,7 +291,7 @@ class SessionPool:
|
||||||
self.sessions.clear()
|
self.sessions.clear()
|
||||||
|
|
||||||
def ensure_connections(self):
|
def ensure_connections(self):
|
||||||
for session, task in list(self.sessions.items()):
|
for session in self.sessions:
|
||||||
self._connect_session(session.server)
|
self._connect_session(session.server)
|
||||||
|
|
||||||
def trigger_nodelay_connect(self):
|
def trigger_nodelay_connect(self):
|
||||||
|
|
Loading…
Reference in a new issue