From 284d307c0f6b8fdc214b693f190bd4a481edeb25 Mon Sep 17 00:00:00 2001 From: Job Evers-Meltzer Date: Tue, 31 May 2016 22:49:00 -0500 Subject: [PATCH] fix logging-too-few-args errors --- lbrynet/core/client/DownloadManager.py | 4 ++-- .../plugins/BlindRepeater/ValuableBlobQueryHandler.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lbrynet/core/client/DownloadManager.py b/lbrynet/core/client/DownloadManager.py index fced77969..d601833dd 100644 --- a/lbrynet/core/client/DownloadManager.py +++ b/lbrynet/core/client/DownloadManager.py @@ -52,7 +52,7 @@ class DownloadManager(object): def check_stop(result, manager): if isinstance(result, failure.Failure): - log.error("Failed to stop the %s: %s", manager. result.getErrorMessage()) + log.error("Failed to stop the %s: %s", manager, result.getErrorMessage()) return False return True @@ -115,4 +115,4 @@ class DownloadManager(object): if not self.blobs: return self.calculate_total_bytes() else: - return sum([b.length for b in self.needed_blobs() if b.length is not None]) \ No newline at end of file + return sum([b.length for b in self.needed_blobs() if b.length is not None]) diff --git a/lbrynet/lbrynet_console/plugins/BlindRepeater/ValuableBlobQueryHandler.py b/lbrynet/lbrynet_console/plugins/BlindRepeater/ValuableBlobQueryHandler.py index 08d5a57a0..d8dd0009e 100644 --- a/lbrynet/lbrynet_console/plugins/BlindRepeater/ValuableBlobQueryHandler.py +++ b/lbrynet/lbrynet_console/plugins/BlindRepeater/ValuableBlobQueryHandler.py @@ -101,7 +101,7 @@ class ValuableBlobHashQueryHandler(ValuableQueryHandler): for blob_hash, count in valuable_hashes: hashes_and_scores.append((blob_hash, 1.0 * count / 10.0)) if len(hashes_and_scores) != 0: - log.info("Responding to a valuable blob hashes request with %s blob hashes: %s", + log.info("Responding to a valuable blob hashes request with %s blob hashes", str(len(hashes_and_scores))) expected_payment = 1.0 * len(hashes_and_scores) * self.valuable_blob_hash_payment_rate / 1000.0 self.wallet.add_expected_payment(self.peer, expected_payment) @@ -193,10 +193,10 @@ class ValuableBlobLengthQueryHandler(ValuableQueryHandler): if success is True: lengths.append(response_pair) if len(lengths) > 0: - log.info("Responding with %s blob lengths: %s", str(len(lengths))) + log.info("Responding with %s blob lengths", str(len(lengths))) expected_payment = 1.0 * len(lengths) * self.blob_length_payment_rate / 1000.0 self.wallet.add_expected_payment(self.peer, expected_payment) self.peer.update_stats('uploaded_valuable_blob_infos', len(lengths)) return {'blob_length': {'blob_lengths': lengths}} - dl.addCallback(make_response) \ No newline at end of file + dl.addCallback(make_response)