From: David Mulder Date: Mon, 19 Jul 2021 17:36:09 +0000 (-0600) Subject: gpo: Improve debug when extension fails to apply X-Git-Tag: ldb-2.5.0~1065 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f97f94e93b03495cf03d08873de5f3b912a003a0;p=thirdparty%2Fsamba.git gpo: Improve debug when extension fails to apply Signed-off-by: David Mulder Reviewed-by: Jeremy Allison --- diff --git a/python/samba/gpclass.py b/python/samba/gpclass.py index 6879719847f..17d7d0c9243 100644 --- a/python/samba/gpclass.py +++ b/python/samba/gpclass.py @@ -23,6 +23,7 @@ sys.path.insert(0, "bin/python") from samba import NTSTATUSError from configparser import ConfigParser from io import StringIO +import traceback from samba.common import get_bytes from abc import ABCMeta, abstractmethod import xml.etree.ElementTree as etree @@ -467,7 +468,8 @@ def apply_gp(lp, creds, logger, store, gp_extensions, force=False): ext.process_group_policy(del_gpos, changed_gpos) except Exception as e: logger.error('Failed to apply extension %s' % str(ext)) - logger.error('Message was: ' + str(e)) + logger.error('Message was: %s: %s' % (type(e).__name__, str(e))) + logger.debug(traceback.format_exc()) continue for gpo_obj in gpos: if not gpo_obj.file_sys_path: