Skip to content

Commit

Permalink
get_credentials: return ValueError for missing creds
Browse files Browse the repository at this point in the history
Related: https://pagure.io/freeipa/issue/8873

Signed-off-by: Alexander Bokovoy <[email protected]>
  • Loading branch information
abbra committed Jun 4, 2021
1 parent be929b7 commit 33327b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ipalib/krb_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def get_credentials(name=None, ccache_name=None):
return gssapi.Credentials(usage='initiate', name=name, store=store)
except gssapi.exceptions.GSSError as e:
if e.min_code in ( # pylint: disable=no-member
KRB5_FCC_NOFILE, GSSPROXY_KRB5_FCC_NOFILE,
KRB5_FCC_NOFILE, GSSPROXY_KRB5_FCC_NOFILE, KRB5_CC_NOTFOUND,
):
raise ValueError('"%s", ccache="%s"' % (e, ccache_name))
raise
Expand Down

0 comments on commit 33327b2

Please sign in to comment.