]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ldb: Pass a supported opaque type to ldb.set_opaque()
authorJo Sutton <josutton@catalyst.net.nz>
Fri, 1 Mar 2024 03:18:10 +0000 (16:18 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 3 Mar 2024 22:33:35 +0000 (22:33 +0000)
We are about to modify ldb.set_opaque() to accept only certain types,
and ldb.Ldb is not one of those types.

Pass in a value that is supported and whose lifetime is guaranteed to
outlive the Ldb object.

Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/ldb/tests/python/api.py

index eff4fccbbae65f7620400b0becef8065363618fa..66cbc35937283625544e6abcb7593913225d0a59 100755 (executable)
@@ -171,7 +171,7 @@ class SimpleLdb(LdbBaseTest):
 
     def test_opaque(self):
         l = ldb.Ldb(self.url(), flags=self.flags())
-        l.set_opaque("my_opaque", l)
+        l.set_opaque("my_opaque", True)
         self.assertTrue(l.get_opaque("my_opaque") is not None)
         self.assertEqual(None, l.get_opaque("unknown"))