Skip to content

Commit

Permalink
Log f.exception() if present instead of "Stopped".
Browse files Browse the repository at this point in the history
  • Loading branch information
moodyjon committed Sep 20, 2022
1 parent a54fa87 commit 13d05d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lbry/wallet/usage_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,13 @@ async def start(self, ledger=None, wallet=None):
def _done_callback(self, f):
if f.cancelled():
reason = "Cancelled"
elif f.exception():
reason = f'Exception: {f.exception()}'
elif not self.running:
reason = "Stopped"
else:
reason = f'Exception: {f.exception()}'
log.info("Stopping wallet server payments. %s", reason)
reason = ""
log.warning("Stopping wallet server payments. %s", reason)

async def stop(self):
if self.running:
Expand Down

0 comments on commit 13d05d3

Please sign in to comment.