]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
gpo: Decode the bytes for cepces-submit failure
authorDavid Mulder <dmulder@suse.com>
Thu, 22 Jul 2021 16:37:41 +0000 (10:37 -0600)
committerJeremy Allison <jra@samba.org>
Fri, 13 Aug 2021 19:14:31 +0000 (19:14 +0000)
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 <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
python/samba/gp_cert_auto_enroll_ext.py

index d20bbdee119e578e7dd39a5eae6fec40b5d69659..ea6591a00c02c4a3ed3ab263886b67bde460d2f6 100644 (file)
@@ -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 []