forked from LBRYCommunity/lbry-sdk
fix pylint errors
This commit is contained in:
parent
7025c5102a
commit
88be425ab2
2 changed files with 0 additions and 19 deletions
|
@ -75,24 +75,6 @@ class BlobRequestHandler(object):
|
||||||
response.addCallback(lambda r: self._reply_to_send_request(r, incoming))
|
response.addCallback(lambda r: self._reply_to_send_request(r, incoming))
|
||||||
return response
|
return response
|
||||||
|
|
||||||
def open_blob_for_reading(self, blob, response):
|
|
||||||
def failure(msg):
|
|
||||||
log.debug("We can not send %s: %s", blob, msg)
|
|
||||||
response['incoming_blob'] = {'error': 'BLOB_UNAVAILABLE'}
|
|
||||||
return response
|
|
||||||
if not blob.is_validated():
|
|
||||||
return failure("blob can't be validated")
|
|
||||||
read_handle = blob.open_for_reading()
|
|
||||||
if read_handle is None:
|
|
||||||
return failure("blob can't be opened")
|
|
||||||
|
|
||||||
self.currently_uploading = blob
|
|
||||||
self.read_handle = read_handle
|
|
||||||
log.info("Sending %s to client", blob)
|
|
||||||
response['incoming_blob']['blob_hash'] = blob.blob_hash
|
|
||||||
response['incoming_blob']['length'] = blob.length
|
|
||||||
return response
|
|
||||||
|
|
||||||
######### IBlobSender #########
|
######### IBlobSender #########
|
||||||
|
|
||||||
def send_blob_if_requested(self, consumer):
|
def send_blob_if_requested(self, consumer):
|
||||||
|
|
|
@ -27,7 +27,6 @@ from txjsonrpc.web.jsonrpc import Handler
|
||||||
from lbrynet import __version__ as lbrynet_version
|
from lbrynet import __version__ as lbrynet_version
|
||||||
from lbryum.version import LBRYUM_VERSION as lbryum_version
|
from lbryum.version import LBRYUM_VERSION as lbryum_version
|
||||||
from lbrynet import analytics
|
from lbrynet import analytics
|
||||||
from lbrynet.core.PaymentRateManager import NegotiatedPaymentRateManager
|
|
||||||
from lbrynet.core.server.BlobRequestHandler import BlobRequestHandlerFactory
|
from lbrynet.core.server.BlobRequestHandler import BlobRequestHandlerFactory
|
||||||
from lbrynet.core.server.ServerProtocol import ServerProtocolFactory
|
from lbrynet.core.server.ServerProtocol import ServerProtocolFactory
|
||||||
from lbrynet.core.Error import UnknownNameError, InsufficientFundsError, InvalidNameError
|
from lbrynet.core.Error import UnknownNameError, InsufficientFundsError, InvalidNameError
|
||||||
|
|
Loading…
Reference in a new issue