mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Enhance __repr__ method of Principal
`__repr__` now returns more descriptive string containing the actual principal name while keeping the ability to reconstruct the object from it. This makes principal names visible in debug logs, easing troubleshooting a bit. https://fedorahosted.org/freeipa/ticket/6505 Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
@@ -181,3 +181,7 @@ class Principal(object):
|
||||
principal_string = u'@'.join([principal_string, realm])
|
||||
|
||||
return principal_string
|
||||
|
||||
def __repr__(self):
|
||||
return "{0.__module__}.{0.__name__}('{1}')".format(
|
||||
self.__class__, self)
|
||||
|
||||
Reference in New Issue
Block a user