mirror of
git://git.yoctoproject.org/poky
synced 2026-08-11 17:53:51 +00: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:
parent
b9223d27bd
commit
2ef7affa31
@ -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)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user