From: Andreas Schneider Date: Mon, 22 Jan 2024 14:05:24 +0000 (+0100) Subject: python:gp: Log an error if update fails X-Git-Tag: talloc-2.4.2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=367756b85a9ac8daaac2326392bcd1373feed3b7;p=thirdparty%2Fsamba.git python:gp: Log an error if update fails BUG: https://bugzilla.samba.org/show_bug.cgi?id=15559 Signed-off-by: Andreas Schneider Reviewed-by: David Mulder Reviewed-by: Pavel Filipenský --- diff --git a/python/samba/gp/gp_cert_auto_enroll_ext.py b/python/samba/gp/gp_cert_auto_enroll_ext.py index b55a0ce3bd0..51b2874b371 100644 --- a/python/samba/gp/gp_cert_auto_enroll_ext.py +++ b/python/samba/gp/gp_cert_auto_enroll_ext.py @@ -347,7 +347,9 @@ def cert_enroll(ca, ldb, trust_dir, private_dir, auth='Kerberos'): data['files'].extend([keyfile, certfile]) data['templates'].append(nickname) if update is not None: - Popen([update]).wait() + ret = Popen([update]).wait() + if ret != 0: + log.error('Failed to run %s' % (update)) else: log.warn('certmonger and cepces must be installed for ' + 'certificate auto enrollment to work')