From 6d305b2fed9a929d3baa8f7adc977296171a9af7 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Mon, 8 Aug 2022 17:14:23 -0400 Subject: [PATCH] lint --- lbry/stream/background_downloader.py | 2 -- lbry/wallet/ledger.py | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lbry/stream/background_downloader.py b/lbry/stream/background_downloader.py index 64848ac3a..d50dcc20a 100644 --- a/lbry/stream/background_downloader.py +++ b/lbry/stream/background_downloader.py @@ -22,8 +22,6 @@ class BackgroundDownloader: await downloader.download_stream_blob(blob_info) except ValueError: return - except asyncio.CancelledError: - raise except Exception: log.error("Unexpected download error on background downloader") finally: diff --git a/lbry/wallet/ledger.py b/lbry/wallet/ledger.py index 3bd3b8d24..477c19f9c 100644 --- a/lbry/wallet/ledger.py +++ b/lbry/wallet/ledger.py @@ -938,7 +938,7 @@ class Ledger(metaclass=LedgerRegistry): "%d change addresses (gap: %d), %d channels, %d certificates and %d claims. ", account.id, balance, total_receiving, account.receiving.gap, total_change, account.change.gap, channel_count, len(account.channel_keys), claim_count) - except Exception as err: + except Exception: log.exception( 'Failed to display wallet state, please file issue ' 'for this bug along with the traceback you see below:') @@ -961,7 +961,7 @@ class Ledger(metaclass=LedgerRegistry): claim_ids = [p.purchased_claim_id for p in purchases] try: resolved, _, _, _ = await self.claim_search([], claim_ids=claim_ids) - except Exception as err: + except Exception: log.exception("Resolve failed while looking up purchased claim ids:") resolved = [] lookup = {claim.claim_id: claim for claim in resolved} @@ -1041,7 +1041,7 @@ class Ledger(metaclass=LedgerRegistry): claim_ids = collection.claim.collection.claims.ids[offset:page_size + offset] try: resolve_results, _, _, _ = await self.claim_search([], claim_ids=claim_ids) - except Exception as err: + except Exception: log.exception("Resolve failed while looking up collection claim ids:") return [] claims = []