From: Noel Power Date: Mon, 27 Jul 2020 16:02:28 +0000 (+0100) Subject: python/samba/tests:blackbox: Fix local file delete test tree fallback X-Git-Tag: talloc-2.3.2~673 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8826d74ae8cd807af84213abde5292b6f5ff293e;p=thirdparty%2Fsamba.git python/samba/tests:blackbox: Fix local file delete test tree fallback 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 Reviewed-by: Jeremy Allison --- diff --git a/python/samba/tests/blackbox/smbcacls.py b/python/samba/tests/blackbox/smbcacls.py index 86e71d81257..b711530de02 100644 --- a/python/samba/tests/blackbox/smbcacls.py +++ b/python/samba/tests/blackbox/smbcacls.py @@ -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():