freeipa/ipalib
Alexander Bokovoy 1223016ef2
console: for public errors only print a final one
By default, interactive console prints full traceback in case of an
error. This looks weird in the console when LDAP errors pop up.
Instead, process PublicError exceptions as if they are final ones and
only print their message.

As a result, calls like api.Command.user_show('unknown') would
result in a concise message:

  >>> api.Command.user_show('unknown')
  IPA public error exception: NotFound: unknown: user not found
  >>>

rather than a two-screen long traceback.

Fixes: https://pagure.io/freeipa/issue/9590

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2024-05-28 11:14:35 +02:00
..
install Support the certmonger nss-user option 2024-05-16 08:46:32 -04:00
__init__.py Move ipalib.install.kinit to ipalib 2024-03-27 18:07:17 +01:00
aci.py De-duplicate ACI attributes and permissions 2020-09-14 09:15:59 +03:00
backend.py pylint: remove unneeded disable=unused-private-member 2023-01-10 08:30:58 +01:00
base.py pylint: fix errors 2024-01-09 08:40:47 +01:00
capabilities.py Support AES for KRA archival wrapping 2022-03-16 12:07:01 +02:00
cli.py console: for public errors only print a final one 2024-05-28 11:14:35 +02:00
config.py Add 'cache_dir' option to api.env 2023-12-01 09:46:31 +01:00
constants.py frontend: add systemd journal audit of executed API commands 2024-05-22 17:06:23 -04:00
crud.py ipalib, ipaserver: fix incorrect API.register calls in docstrings 2016-05-25 16:06:26 +02:00
dns.py dnsrecord-mod: allow to modify ttl without passing the record 2019-07-01 09:16:21 +02:00
errors.py rpcserver: fix exception handling for FAST armor failure 2020-10-30 19:06:11 +02:00
facts.py Fall back to old server installation detection when needed 2020-08-18 11:11:26 +02:00
frontend.py frontend: add systemd journal audit of executed API commands 2024-05-22 17:06:23 -04:00
ipajson.py ipalib: move json formatter to a separate file 2024-05-22 17:06:23 -04:00
kinit.py Move ipalib.install.kinit to ipalib 2024-03-27 18:07:17 +01:00
krb_utils.py Move ipalib.install.kinit to ipalib 2024-03-27 18:07:17 +01:00
Makefile.am Build: Makefiles for Python packages 2016-11-09 13:08:32 +01:00
messages.py Warn for permissions with read/write/search/compare and no attrs 2022-07-15 16:59:15 +02:00
misc.py plugins: Don't treat keys of api as bytes 2021-06-28 14:16:56 +03:00
output.py Generate same API.txt under Python 2 and 3 2018-02-15 09:41:30 +01:00
parameters.py Use datetime.timezone.utc instead of newer datetime.UTC alias 2023-09-29 15:06:33 -04:00
pkcs10.py Change FreeIPA references to IPA and Identity Management 2021-01-21 13:51:45 +01:00
plugable.py pylint: remove unneeded disable=unused-private-member 2023-01-10 08:30:58 +01:00
request.py Py3: Remove subclassing from object 2018-09-27 11:49:04 +02:00
rpc.py ipalib/rpc: Reformat after moving json code around 2024-05-22 17:06:23 -04:00
setup.cfg Port all setup.py to setuptools 2016-10-20 18:43:37 +02:00
setup.py Use ssl.match_hostname from urllib3 as it was removed from Python 3.12 2023-07-19 08:27:30 +02:00
sysrestore.py pylint: Fix consider-using-dict-items 2022-03-11 13:37:08 -05:00
text.py pylint: Fix useless-suppression 2022-03-11 13:37:08 -05:00
util.py IPA API changes to support RBCD 2023-04-05 14:55:22 -04:00
x509.py Compatibility fix for PyCA cryptography 42.0.0 2024-01-24 14:54:24 +01:00