]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python/samba/tests:blackbox: Fix local file delete test tree fallback
authorNoel Power <noel.power@suse.com>
Mon, 27 Jul 2020 16:02:28 +0000 (17:02 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 31 Aug 2020 17:44:38 +0000 (17:44 +0000)
Wrong indentation ensures the fallback where we use file system removal
of test files if the test's tearDown method fails.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
python/samba/tests/blackbox/smbcacls.py

index 86e71d81257824cb8cead8e3789ef294583ba78b..b711530de0275a31c28b8821bd1f265a12c010a9 100644 (file)
@@ -55,11 +55,11 @@ class SmbCaclsBlockboxTestBase(BlackboxTestCase):
             if os.path.exists(dirpath):
                 for entry in os.listdir(dirpath):
                     fullpath = os.path.join(dirpath, entry)
-                if os.path.isdir(fullpath):
-                    import shutil
-                    shutil.rmtree(fullpath)
-                else:
-                    os.unlink(fullpath)
+                    if os.path.isdir(fullpath):
+                        import shutil
+                        shutil.rmtree(fullpath)
+                    else:
+                        os.unlink(fullpath)
 
     def ace_dump(self, ace):
         for key, value in ace.items():