1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-23 00:23:53 +03:00

gp: Prefer ‘x not in y’ to ‘not x in y’

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton
2023-08-25 13:58:17 +12:00
committed by Andrew Bartlett
parent 94afa3b194
commit 036a523e51

View File

@@ -709,7 +709,7 @@ def get_gpo_link(samdb, link_dn):
'(objectclass=*)', ['gPLink', 'gPOptions'])
if res.count != 1:
raise ldb.LdbError(ldb.ERR_NO_SUCH_OBJECT, 'get_gpo_link: no result')
if not 'gPLink' in res.msgs[0]:
if 'gPLink' not in res.msgs[0]:
raise ldb.LdbError(ldb.ERR_NO_SUCH_ATTRIBUTE,
"get_gpo_link: no 'gPLink' attribute found for '{}'".format(link_dn)
)