fix Kerberos authentication for modern python: e.message is deprecated, and e.err_code no longer exists
This commit is contained in:
parent
5ab3868150
commit
ea6c283ba5
2 changed files with 2 additions and 2 deletions
|
|
@ -3500,7 +3500,7 @@ if __name__ == "__main__":
|
|||
keytab=options.keytab,
|
||||
ccache=options.ccache)
|
||||
except krbV.Krb5Error, e:
|
||||
quit("Kerberos authentication failed: '%s' (%s)" % (e.message, e.err_code))
|
||||
quit("Kerberos authentication failed: '%s' (%s)" % (e.args[1], e.args[0]))
|
||||
except socket.error, e:
|
||||
quit("Could not connect to Kerberos authentication service: '%s'" % e.args[1])
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ def activate_session(session):
|
|||
else:
|
||||
session.krb_login(proxyuser=options.runas)
|
||||
except krbV.Krb5Error, e:
|
||||
error(_("Kerberos authentication failed: '%s' (%s)") % (e.message, e.err_code))
|
||||
error(_("Kerberos authentication failed: '%s' (%s)") % (e.args[1], e.args[0]))
|
||||
except socket.error, e:
|
||||
warn(_("Could not connect to Kerberos authentication service: '%s'") % e.args[1])
|
||||
if not options.noauth and not session.logged_in:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue