From: David Mulder Date: Thu, 22 Jul 2021 16:37:41 +0000 (-0600) Subject: gpo: Decode the bytes for cepces-submit failure X-Git-Tag: ldb-2.5.0~972 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3a956e075b6030534463689b820eb037aeed4f3;p=thirdparty%2Fsamba.git gpo: Decode the bytes for cepces-submit failure When displaying the error from cepces-submit, make sure to decode the bytes (otherwise it is hard to read). Also print the error to debug instead of warn (it may dump a traceback). Signed-off-by: David Mulder Reviewed-by: Jeremy Allison --- diff --git a/python/samba/gp_cert_auto_enroll_ext.py b/python/samba/gp_cert_auto_enroll_ext.py index d20bbdee119..ea6591a00c0 100644 --- a/python/samba/gp_cert_auto_enroll_ext.py +++ b/python/samba/gp_cert_auto_enroll_ext.py @@ -85,8 +85,8 @@ def get_supported_templates(server, logger): stdout=PIPE, stderr=PIPE) out, err = p.communicate() if p.returncode != 0: - logger.warn('Failed to fetch the list of supported templates:' + - '\n%s' % err) + logger.warn('Failed to fetch the list of supported templates.') + logger.debug(err.decode()) return out.strip().split() return []