Skip to content

beaglecli crashes immediately if it cannot connect to Beagle #6

@stevekm

Description

@stevekm

beaglecli crashes immediately upon starting if it cannot connect to a Beagle instance. This prevents you from seeing the 'help' page with beaglecli -h;

$ beaglecli -h
Traceback (most recent call last):
  File "/home/kellys5/projects/beagle-dev/beagle-dev4/conda/lib/python3.7/site-packages/urllib3/connection.py", line 159, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/home/kellys5/projects/beagle-dev/beagle-dev4/conda/lib/python3.7/site-packages/urllib3/util/connection.py", line 80, in create_connection
    raise err
  File "/home/kellys5/projects/beagle-dev/beagle-dev4/conda/lib/python3.7/site-packages/urllib3/util/connection.py", line 70, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:
....
....

It would be more helpful to allow bealgecli to delay trying to establish a connection to a Beagle instance until it actually needs one, so you can at least see the 'help' page in offline mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions