URL:
https://github.com/freeipa/freeipa/pull/880
Author: felipevolpone
Title: #880: Changing how commands handles error when it can't connect to IPA server
Action: opened
PR body:
"""
The commands that connects with IPA server can raise a `NetworkError` with the message:
"ipa: ERROR: can't connect to `http://localhost:8888/ipa/json': [Errno 111]
Connection refused`. Instead of that, this changes the message error in order to be more
user-friendly.
I've used the `GenericError` because it inherits from `PublicError`and do not have a
default message. So, I do not have to change the `run` method in `ipalib/cli.py` to handle
a different exception/case.
Ticket:
https://pagure.io/freeipa/issue/6261
"""
To pull the PR as Git branch:
git remote add ghfreeipa
https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/880/head:pr880
git checkout pr880