mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-11-02 20:30:26 -06:00
Print PublicError traceback when in debug mode
The framework only shows traceback for the internal/unknown errors, recognized PublicErrors are simply passed back to the FreeIPA clients. However, sometimes it would help to see a traceback of the PublicError to for example see exactly which line returns it. https://fedorahosted.org/freeipa/ticket/4847 Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
1 parent
fe4b3190e9
commit
834c911f96
1 file changed
+3
@@ -29,6 +29,7 @@ import os
|
||||
import datetime
|
||||
import urlparse
|
||||
import json
|
||||
import traceback
|
||||
|
||||
import ldap.controls
|
||||
from pyasn1.type import univ, namedtype
|
||||
@@ -347,6 +348,8 @@ class WSGIExecutioner(Executioner):
|
||||
else:
|
||||
result = self.Command[name](*args, **options)
|
||||
except PublicError, e:
|
||||
if self.api.env.debug:
|
||||
self.debug('WSGI wsgi_execute PublicError: %s', traceback.format_exc())
|
||||
error = e
|
||||
except StandardError, e:
|
||||
self.exception(
|
||||
|
||||
Reference in new issue
Block a user