mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
oeqa/sdk/rust: Fix file deletion for multilib SDKs
We need to use shutil.rmtree here since removedirs() only covers directories. Make the exception for specific too to make errors easier to catch. (From OE-Core rev: 9d2a661e46123a2292f7887658e6fa54923dbcc0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -19,8 +19,8 @@ class RustCompileTest(OESDKTestCase):
|
||||
def setUpClass(self):
|
||||
targetdir = os.path.join(self.tc.sdk_dir, "hello")
|
||||
try:
|
||||
os.removedirs(targetdir)
|
||||
except OSError:
|
||||
shutil.rmtree(targetdir)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
shutil.copytree(os.path.join(self.tc.sdk_files_dir, "rust/hello"), targetdir)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user