85a2cb7 console: for public errors only print a final one

1 file Authored by abbra a month ago, Committed by frenaud a month ago,
1 file changed. 14 lines added. 2 lines removed.
    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>
    
        
file modified
+14 -2