1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-03-21 18:50:38 +03:00

Merge pull request #119 from altlinux/fix_kerberos_logging

Improved logging on Kerberos errors
This commit is contained in:
NIR 2020-09-11 19:08:37 +04:00 committed by GitHub
commit e2c386b6d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,10 +74,13 @@ def check_krb_ticket():
try:
subprocess.check_call(['klist', '-s'])
output = subprocess.check_output('klist', stderr=subprocess.STDOUT).decode()
logging.info(output)
result = True
log('D17')
except:
log('E14')
logdata = dict()
logdata['output'] = output
log('D17', logdata)
except Exception as exc:
logdata = dict()
logdata['krb-exc'] = exc
log('E14', logdata)
return result