From b703e501600f96bd3c309ff63c4a269d2bc644f9 Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Wed, 4 Jan 2023 16:17:23 -0700 Subject: [PATCH] Use rm -rf for deleting temp directories on Windows too --- btest | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/btest b/btest index 96f698ff..baf0e118 100755 --- a/btest +++ b/btest @@ -1386,11 +1386,7 @@ class Test(object): os.remove(self.tmpdir) if os.path.isdir(self.tmpdir): - if sys.platform == 'win32': - win_path = pathlib.PureWindowsPath(self.tmpdir) - subprocess.call("rmdir /s /q %s" % (str(win_path)), shell=True) - else: - subprocess.call("rm -rf %s 2>/dev/null" % (self.tmpdir), shell=True) + subprocess.call("rm -rf %s 2>/dev/null" % self.tmpdir, stderr=subprocess.DEVNULL) except OSError as e: error("cannot remove tmp directory %s: %s" % (self.tmpdir, e))