From: Andreas Schneider Date: Mon, 22 Jan 2024 14:46:24 +0000 (+0100) Subject: python:gp: Improve working of log messages to avoid confusion X-Git-Tag: talloc-2.4.2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f823424418e814d9dc0785658e2a7d92643dab2;p=thirdparty%2Fsamba.git python:gp: Improve working of log messages to avoid confusion We should not use the word "Failed". We are totally fine if we can't connect to NDES in the meantime. This logs: Try to get root or server certificates. Unable to install root certificates (requires NDES). Installing the server certificate only. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15559 Signed-off-by: Andreas Schneider Reviewed-by: David Mulder Reviewed-by: Pavel Filipenský Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Mon Jan 29 10:37:29 UTC 2024 on atb-devel-224 --- diff --git a/python/samba/gp/gp_cert_auto_enroll_ext.py b/python/samba/gp/gp_cert_auto_enroll_ext.py index 51b2874b371..9b743cb7f9b 100644 --- a/python/samba/gp/gp_cert_auto_enroll_ext.py +++ b/python/samba/gp/gp_cert_auto_enroll_ext.py @@ -209,12 +209,10 @@ def getca(ca, url, trust_dir): r = requests.get(url=url, params={'operation': 'GetCACert', 'message': 'CAIdentifier'}) except requests.exceptions.ConnectionError: - log.warn('Failed to establish a new connection') + log.warn('Could not connect to Network Device Enrollment Service.') r = None if r is None or r.content == b'' or r.headers['Content-Type'] == 'text/html': - log.warn('Failed to fetch the root certificate chain.') - log.warn('The Network Device Enrollment Service is either not' + - ' installed or not configured.') + log.warn('Unable to fetch root certificates (requires NDES).') if 'cACertificate' in ca: log.warn('Installing the server certificate only.') der_certificate = base64.b64decode(ca['cACertificate'])