]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ldb:tests:api.py uses .disconnect before rmdir
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Sat, 17 Aug 2024 01:27:52 +0000 (13:27 +1200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 24 Sep 2024 09:14:38 +0000 (09:14 +0000)
super.tearDown() was removing the tmpdir, but because self.ldb had
the file open, the directory was not cleared.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
lib/ldb/tests/python/api.py

index ce9366dbc5e0cc3c05bce8306e5581f742baac99..e40009561a09bd11fdc7400f81a7d1ca0e0da117 100755 (executable)
@@ -106,10 +106,10 @@ class SimpleLdb(LdbBaseTest):
             pass
 
     def tearDown(self):
+        self.ldb.disconnect()
         shutil.rmtree(self.testdir)
         super().tearDown()
         # Ensure the LDB is closed now, so we close the FD
-        del(self.ldb)
 
     def test_connect(self):
         ldb.Ldb(self.url(), flags=self.flags())