mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Define errors_by_code in ipalib.errors
The errors_by_code mapping could be used in more places. In particular it will be useful in the Dogtag GSS-API authentication effort. Move to ipalib.errors. Part of: https://pagure.io/freeipa/issue/5011 Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
@@ -2016,5 +2016,7 @@ class GenericError(PublicError):
|
||||
public_errors = tuple(sorted(
|
||||
messages.iter_messages(globals(), PublicError), key=lambda E: E.errno))
|
||||
|
||||
errors_by_code = dict((e.errno, e) for e in public_errors)
|
||||
|
||||
if __name__ == '__main__':
|
||||
messages.print_report('public errors', public_errors)
|
||||
|
||||
Reference in New Issue
Block a user