mirror of
https://github.com/samba-team/samba.git
synced 2025-12-23 00:23:53 +03:00
gp: get_gpo() should re-raise the Exception, not return
If we return from this failure, then `new_gpo` is set to `None` and we will fail in some obscure way within a CSE later (since we append `None` to the GPO list). Instead, re-raise the Exception so we see that an error happened when fetching the GPO. Signed-off-by: David Mulder <dmulder@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
9755206f6d
commit
1dbdeaa8d7
@@ -618,7 +618,7 @@ def get_gpo(samdb, gpo_dn):
|
||||
controls=['sd_flags:1:%d' % sd_flags])
|
||||
except Exception:
|
||||
log.error('Failed to fetch gpo object with nTSecurityDescriptor')
|
||||
return
|
||||
raise
|
||||
if res.count != 1:
|
||||
raise ldb.LdbError(ldb.ERR_NO_SUCH_OBJECT,
|
||||
'get_gpo: search failed')
|
||||
|
||||
Reference in New Issue
Block a user