diff options
author | David Mulder <dmulder@suse.com> | 2018-01-08 09:19:13 -0700 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2018-01-13 22:38:05 +0100 |
commit | 88152adeca704bb49574802b280142164a899e31 (patch) | |
tree | cd5dbec2f5a960eb5b7cd172487b329ba180fcf0 /source4/scripting | |
parent | ef49d0b9eff9b90fa5533d50a0fc26405f44d449 (diff) | |
download | samba-88152adeca704bb49574802b280142164a899e31.tar.gz |
gpo: Continue parsing GPOs even if one fails
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting')
-rwxr-xr-x | source4/scripting/bin/samba_gpoupdate | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source4/scripting/bin/samba_gpoupdate b/source4/scripting/bin/samba_gpoupdate index f593e473fb1..e74b2c896a1 100755 --- a/source4/scripting/bin/samba_gpoupdate +++ b/source4/scripting/bin/samba_gpoupdate @@ -74,13 +74,15 @@ def apply_gp(lp, creds, test_ldb, logger, store, gp_extensions): gp_db.state(GPOSTATE.ENFORCE) gp_db.set_guid(guid) store.start() - try: - for ext in gp_extensions: + for ext in gp_extensions: + try: ext.parse(ext.list(path), test_ldb, conn, gp_db, lp) - except: - logger.error('Failed to parse gpo %s' % guid) - store.cancel() - continue + except Exception as e: + logger.error('Failed to parse gpo %s for extension %s' % \ + (guid, str(ext))) + logger.error('Message was: ' + str(e)) + store.cancel() + continue store.store(guid, '%i' % version) store.commit() |