From: Jo Sutton Date: Fri, 1 Mar 2024 03:18:10 +0000 (+1300) Subject: ldb: Pass a supported opaque type to ldb.set_opaque() X-Git-Tag: tdb-1.4.11~1533 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ab6cb4bc97255296d53415eafbeb1a71a9d17cc8;p=thirdparty%2Fsamba.git ldb: Pass a supported opaque type to ldb.set_opaque() 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 Reviewed-by: Andrew Bartlett --- diff --git a/lib/ldb/tests/python/api.py b/lib/ldb/tests/python/api.py index eff4fccbbae..66cbc359372 100755 --- a/lib/ldb/tests/python/api.py +++ b/lib/ldb/tests/python/api.py @@ -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"))