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: if self._blob_download_request is None:
d = self.add_request(blob_request) d = self.add_request(blob_request)
self._blob_download_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 return d
else: else:
raise ValueError("There is already a blob download request active") 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) self.peer, self._blob_download_request.blob)
result = None result = None
elif not err.check(MisbehavingPeerError, ConnectionClosedBeforeResponseError): 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 result = err
else: else:
log.error("The connection to %s is closing due to an unexpected error: %s", log.error("The connection to %s is closing due to an unexpected error: %s",

View file

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