Rewrap errors in get_principal to CCacheError

Causes nicer error message when kerberos credentials are not available.

https://fedorahosted.org/freeipa/ticket/5272

Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Tomas Babej <tbabej@redhat.com>
This commit is contained in:
Michael Simacek authored and Jan Cholasta committed 2015-09-22 13:29:55 +02:00
1 parent cfeea91828
commit bdccebbcdb
4 files changed
+16 -8

No files matched your search

+1 -1
View File
@@ -310,7 +310,7 @@ def main():
try:
principal = krb_utils.get_principal()
except gssapi.exceptions.GSSError as e:
except errors.CCacheError as e:
sys.exit("Must have Kerberos credentials to setup AD trusts on server: %s" % e.message)
try: