git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94afa3b
)
gp: Prefer ‘x not in y’ to ‘not x in y’
author
Joseph Sutton
<josephsutton@catalyst.net.nz>
Fri, 25 Aug 2023 01:58:17 +0000
(13:58 +1200)
committer
Andrew Bartlett
<abartlet@samba.org>
Wed, 30 Aug 2023 02:15:29 +0000
(
02:15
+0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/gp/gpclass.py
patch
|
blob
|
history
diff --git
a/python/samba/gp/gpclass.py
b/python/samba/gp/gpclass.py
index a2d5d877cb60585a91e09b731f6ecb9ec7411d3f..437f9961f3a3e51fff3d07c75ac3d15be6ee2c19 100644
(file)
--- a/
python/samba/gp/gpclass.py
+++ b/
python/samba/gp/gpclass.py
@@
-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)
)