fix lints

This commit is contained in:
Kay Kurokawa 2017-09-15 15:10:31 -04:00 committed by Jack Robison
parent b6e9aa420c
commit ab3c987034
No known key found for this signature in database
GPG key ID: 284699E7404E3CFF
2 changed files with 4 additions and 3 deletions

View file

@ -117,7 +117,8 @@ class ClientProtocol(Protocol, TimeoutMixin):
if self._blob_download_request is None:
d = self.add_request(blob_request)
self._blob_download_request = blob_request
blob_request.finished_deferred.addCallbacks(self._downloading_finished, self._handle_response_error)
blob_request.finished_deferred.addCallbacks(self._downloading_finished,
self._handle_response_error)
return d
else:
raise ValueError("There is already a blob download request active")
@ -201,7 +202,7 @@ class ClientProtocol(Protocol, TimeoutMixin):
self.peer, self._blob_download_request.blob)
result = None
elif not err.check(MisbehavingPeerError, ConnectionClosedBeforeResponseError):
log.warning("The connection to %s is closing due to: %s", err)
log.warning("The connection to %s is closing due to: %s", self.peer, err)
result = err
else:
log.error("The connection to %s is closing due to an unexpected error: %s",

View file

@ -143,7 +143,7 @@ class LBRYioBTCFeed(MarketFeed):
try:
json_response = json.loads(response)
except ValueError:
raise InvalidExchangeRateResponse("invalid rate response : %s" % response)
raise InvalidExchangeRateResponse(self.name, "invalid rate response : %s" % response)
if 'data' not in json_response:
raise InvalidExchangeRateResponse(self.name, 'result not found')
return defer.succeed(1.0 / json_response['data']['btc_usd'])