Skip to content

Commit

Permalink
cli.py: print exception if there is a problem
Browse files Browse the repository at this point in the history
As reported in issue lbryio#2769, the `lbrynet` daemon doesn't respond
correctly when it is compiled against Python 3.8+, only with
Python 3.7.

In this case it will raise the exception `aiohttp.ClientConnectionError`

We want to print this exception for the future to know what
went wrong.
  • Loading branch information
belikor committed Jul 11, 2021
1 parent 8c79740 commit 8d4598b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lbry/extras/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ async def execute_command(conf, method, params, callback=display):
return callback(data['error'])
except Exception as e:
log.exception('Could not process response from server:', exc_info=e)
except aiohttp.ClientConnectionError:
except aiohttp.ClientConnectionError as cce:
log.exception("Exception: ", exc_info=cce)
print("Could not connect to daemon. Are you sure it's running?")


Expand Down

0 comments on commit 8d4598b

Please sign in to comment.